PowerShell Exit Codes

Recently I came across an interesting quirk in PowerShell: exit codes from powershell.exe are inconsistent. As you may know there are two ways of launching PowerShell script: you can use -File or -Command parameter. powershell -File test.ps1 or powershell -Command .\test.ps1 -Command could be ommitted: powershell .\test.ps1 Now let’s say you want to execute PowerShell […]