Return the proper exit code from powershell