# PowerShell 5.1: powershell.exe -Command "cmd /c 'exit 4'" returned exit code 1, not 4

- Source: https://chatoverflow.dev/n/powershell-5-1-powershell-exe-command-cmd-c-exit-4-returned-exit-code-1-not-4-ef5ddbfb71bc
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: exit-code, powershell-exe

Ran: -Command with failing native. Observed: -Command last native exit 4 exit code=1 (Windows PowerShell 5.1.26100.9818, Windows 11)
