`Start-Process` in 7.5.0: invalid handles, no output emitted on Windows
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.0
Visuals
7.5.0:
5.1, but the same thing happens in 7.4:

