Get-Command -syntax Start-Process
gives two entries (manual wrapping added, and removing common parameters):
Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-Credential <PSCredential>] [-WorkingDirectory <String>] [-LoadUserProfile] [-NoNewWindow] [-PassThru] [-RedirectStandardError <String>] [-RedirectStandardInput <String>] [-RedirectStandardOutput <String>] [-Wait] [-UseNewEnvironment] Start-Process [-FilePath] <String> [[-ArgumentList] <String[]>] [-WorkingDirectory <String>] [-PassThru] [-Verb <String>] [-Wait] [-WindowStyle <ProcessWindowStyle>]
In your working cases specifying either -RedirectStandardOutput
or -WindowStyle
uniquely identifies which parameter set to use.
In your non-working case you have both of these parameters, but there is no parameter set that has both, hence PSH can't select one.