-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
7.5-regressionThe issue is a regressionThe issue is a regressionIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Run the following on Windows:
Start-Process -Wait -NoNewWindow -RedirectStandardError tmp.txt -FilePath cmd -ArgumentList "/C echo Hello"Expected behavior
This should output `Hello` and produce an empty `tmp.txt` file.Actual behavior
On Windows:
- There is no stdout output
- A `tmp.txt` file is produced, with the following content: `The handle is invalid.`
On WSL, everything works as expected, but the command needs to be adjusted:
Start-Process -Wait -NoNewWindow -RedirectStandardError tmp.txt -FilePath bash -ArgumentList '-c "echo Hello"'Error details
PowerShell does not return an error, `Get-Error` doesn't return anything.Environment data
Name Value
---- -----
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0Visuals
7.5.0:
5.1, but the same thing happens in 7.4:
mklement0 and 0xfeeddeadbeef
Metadata
Metadata
Assignees
Labels
7.5-regressionThe issue is a regressionThe issue is a regressionIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management module

