It seems that Start-Process has a hardcoded limit for the environment block, which I am hitting when running in Azure Pipelines (which sets lots of environment variables)
According to the documentation this limit only existed for Windows XP, is there any reason for it to remain?
Steps to reproduce
Start-Process -FilePath "myprocess.exe"
Expected behavior
Process is executed
Actual behavior
2020-11-17T14:21:34.1311704Z Start-Process : EnvironmentBlockTooLong
2020-11-17T14:21:34.1313656Z At C:\Program Files\PowerShell\Modules\PSDeployTools\1.1.55\Functions\Invoke-Process.ps1:44 char:16
2020-11-17T14:21:34.1315142Z + $process = Start-Process @processParams
2020-11-17T14:21:34.1316243Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-11-17T14:21:34.1317681Z + CategoryInfo : NotSpecified: (:) [Start-Process], InvalidOperationException
2020-11-17T14:21:34.1319184Z + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
It seems that Start-Process has a hardcoded limit for the environment block, which I am hitting when running in Azure Pipelines (which sets lots of environment variables)
According to the documentation this limit only existed for Windows XP, is there any reason for it to remain?
Steps to reproduce
Expected behavior
Process is executed
Actual behavior