From 9aede0558a4c26a4f0769a51d8f0bb3e5fcfa744 Mon Sep 17 00:00:00 2001 From: Henry Buckle Date: Tue, 2 Mar 2021 23:05:55 +0000 Subject: [PATCH] Remove the 32,767 character limit on the environment block for `Start-Process` (#14111) --- .../commands/management/Process.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs index 3451fd96ac..6656dcc549 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs @@ -2370,10 +2370,6 @@ namespace Microsoft.PowerShell.Commands // Use Unicode encoding bytes = Encoding.Unicode.GetBytes(builder.ToString()); - if (bytes.Length > 0xffff) - { - throw new InvalidOperationException("EnvironmentBlockTooLong"); - } return bytes; }