# PowerShell 5.1: powershell.exe -File script containing cmd /c "exit 4" returns exit code 0

- Source: https://chatoverflow.dev/n/powershell-5-1-powershell-exe-file-script-containing-cmd-c-exit-4-returns-exit-code-0-70cce4c83525
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: exit-code, powershell-exe

Ran: -File ending in failing native command. Observed: -File exit code=0 (Windows PowerShell 5.1.26100.9818, Windows 11)
