Title: Start-Process fails with `EnvironmentBlockTooLong` error · Issue #14110 · PowerShell/PowerShell · GitHub
Open Graph Title: Start-Process fails with `EnvironmentBlockTooLong` error · Issue #14110 · PowerShell/PowerShell
X Title: Start-Process fails with `EnvironmentBlockTooLong` error · Issue #14110 · PowerShell/PowerShell
Description: 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...
Open Graph Description: 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 documenta...
X Description: 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 documenta...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/14110
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Start-Process fails with `EnvironmentBlockTooLong` error","articleBody":"It seems that Start-Process has a [hardcoded limit](https://github.com/PowerShell/PowerShell/blob/a0e9d7b04069da2de2cfa844459c2c859e363088/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs#L2342) for the environment block, which I am hitting when running in Azure Pipelines (which sets lots of environment variables)\r\n\r\nAccording to the [documentation](https://docs.microsoft.com/en-gb/windows/win32/procthread/environment-variables) this limit only existed for Windows XP, is there any reason for it to remain?\r\n\r\n## Steps to reproduce\r\n\r\n```powershell\r\nStart-Process -FilePath \"myprocess.exe\"\r\n```\r\n\r\n## Expected behavior\r\n\r\nProcess is executed\r\n\r\n## Actual behavior\r\n\r\n```none\r\n2020-11-17T14:21:34.1311704Z Start-Process : EnvironmentBlockTooLong\r\n2020-11-17T14:21:34.1313656Z At C:\\Program Files\\PowerShell\\Modules\\PSDeployTools\\1.1.55\\Functions\\Invoke-Process.ps1:44 char:16\r\n2020-11-17T14:21:34.1315142Z + $process = Start-Process @processParams\r\n2020-11-17T14:21:34.1316243Z + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n2020-11-17T14:21:34.1317681Z + CategoryInfo : NotSpecified: (:) [Start-Process], InvalidOperationException\r\n2020-11-17T14:21:34.1319184Z + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand\r\n```\r\n","author":{"url":"https://github.com/hbuckle","@type":"Person","name":"hbuckle"},"datePublished":"2020-11-17T14:38:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/14110/PowerShell/issues/14110"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1d32941a-75cf-be8b-fac9-5f56de054990 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B62A:C9E65:99E4DC:CCD077:6A519D18 |
| html-safe-nonce | f6a5a7a92bcf4d8cf6df4d945551092d704b753da5d4e2e407a46140ad4da8bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjJBOkM5RTY1Ojk5RTREQzpDQ0QwNzc6NkE1MTlEMTgiLCJ2aXNpdG9yX2lkIjoiODAwODkxMDA0MzU5MTMxODgwOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7ad73cf5d5cd3ba84668bc19d8bb08f339e92fb473e591b46bfc725322b45705 |
| hovercard-subject-tag | issue:744794762 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/14110/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4cbf2ceb45eefd8bf4c57f0e4ee970dd4e5abb60095f2d2bcc44b345f0ac54db/PowerShell/PowerShell/issues/14110 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4cbf2ceb45eefd8bf4c57f0e4ee970dd4e5abb60095f2d2bcc44b345f0ac54db/PowerShell/PowerShell/issues/14110 |
| og:image:alt | 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 documenta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hbuckle |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width