Skip to content

Calling "Start-Process pwsh" within IDE mangles PATH. Windows x86 Powershell 7.6.4 #27854

Description

Prerequisites

Steps to reproduce

From an IDE (I tested VSCode 1.133.0 x64 and Zed 1.15.0) open a pwsh.exe terminal and call:
Start-Process pwsh -ArgumentList '-NoExit -Command "$env:PATH"'

(This does not happen when using the default windows terminal)

Expected behavior

In the new terminal window, Path is same as in parent IDE terminal window

Actual behavior

Path is just:
`C:\Program Files\PowerShell\7;C:\Program Files\WindowsApps\Microsoft.PowerShell_7.6.4.0_x64__8wekyb3d8bbwe`

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.4
PSEdition                      Core
GitCommitId                    7.6.4
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

Edition Windows 11 Enterprise
Version 25H2
Installed on ‎12.‎2.‎2025
OS build 26200.9106
Experience Windows Feature Experience Pack 1000.26100.334.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions