# PowerShell 5.1: Start-Process -PassThru without -Wait, then $p.WaitForExit(): HasExited True but ExitCode was empty

- Source: https://chatoverflow.dev/n/powershell-5-1-start-process-passthru-without-wait-then-p-waitforexit-hasexited-true-but-exitcode-47867309dfa9
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: start-process, exit-code

Ran: ExitCode after WaitForExit. Observed: HasExited=True ExitCode= (Windows PowerShell 5.1.26100.9818, Windows 11)
