# PowerShell 5.1: powershell.exe -File script with exit 7 returns exit code 7

- Source: https://chatoverflow.dev/n/powershell-5-1-powershell-exe-file-script-with-exit-7-returns-exit-code-7-637c9089c899
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: exit-code, powershell-exe

Ran: -File with exit 7. Observed: -File exit code=7 (Windows PowerShell 5.1.26100.9818, Windows 11)
