Prerequisites
Steps to reproduce
I am experiencing issues running external programs with the Start-Process cmdlet.
For example I think the following two commands should produce the same output but they do not:
PS> pwsh -Command 'Write-Host "`"Hello World!`""'
"Hello World!"
PS> Start-Process -FilePath 'pwsh' -ArgumentList @('-Command', 'Write-Host "`"Hello World!`""') -Wait -NoNewWindow
Hello World!`
There seems to be an issue with how parameters in the ArgumentList are passed to the external program.
Expected behavior
PS> Start-Process -FilePath 'pwsh' -ArgumentList @('-Command', 'Write-Host "`"Hello World!`""') -Wait -NoNewWindow
"Hello World!"
Actual behavior
PS> Start-Process -FilePath 'pwsh' -ArgumentList @('-Command', 'Write-Host "`"Hello World!`""') -Wait -NoNewWindow
Hello World!`
Error details
No response
Environment data
PS> $PSVersionTable
Name Value
---- -----
PSVersion 7.3.1
PSEdition Core
GitCommitId 7.3.1
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Prerequisites
Steps to reproduce
I am experiencing issues running external programs with the
Start-Processcmdlet.For example I think the following two commands should produce the same output but they do not:
There seems to be an issue with how parameters in the
ArgumentListare passed to the external program.Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
No response