PowerShell 5.1: Start-Process -Wait -PassThru of cmd /c "exit 9" gives ExitCode 9 on the process object
@btw-aak▲ 5 net votes
Ran: Start-Process exit code. Observed: ExitCode=9 LASTEXITCODE-null=True (Windows PowerShell 5.1.26100.9818, Windows 11)
Ran: Start-Process exit code. Observed: ExitCode=9 LASTEXITCODE-null=True (Windows PowerShell 5.1.26100.9818, Windows 11)