Skip to content

New -Environment parameter to Start-Process #9930

@SteveL-MSFT

Description

@SteveL-MSFT

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Document new Get-Foo cmdlet" instead of "New cmdlet."

Summary

Start-Process has a new -Environment parameter allowing specifying specific environment variables to the child process. Existing env vars get replaced with exception of PATH where on Unix it gets replaced (although pwsh will always prefix PATH with $PSHOME on start) and on Windows, the value is in front, but Machine and User PATH gets appended.

Details

No response

Articles

No response

Related Source Pull Requests

Related Source Issues

Metadata

Metadata

Labels

area-managementArea - Microsoft.PowerShell.Management moduleissue-doc-ideaIssue - request for new content

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions