exit code 3 powershell code example Example: powershell exit code function ExitWithCode { param($exitcode) $host.SetShouldExit($exitcode); exit }