/
Exit-PSScript
Exit-PSScript
Syntax
Exit-PSScript -exitcode <> -exitmessage <string>
Parameters
exitcode
The error code to end running of the script, see Error Codes for examples of predefined error codes
exitmessage
An message to add to the log
Example
Exit-PSScript $Error
# PACKAGE_CANCELLED_NOT_COMPLIANT
Exit-PSScript 3327 -exitmessage "Office is not installed"
, multiple selections available,
Related content
$cs.Job_Start
$cs.Job_Start
More like this
PowerShell Scripting Library
PowerShell Scripting Library
Read with this
$cs.Shell_ExecuteWithTimeout
$cs.Shell_ExecuteWithTimeout
More like this
$cs.Job_WriteLog
$cs.Job_WriteLog
More like this
PowerPack Global Variables
PowerPack Global Variables
Read with this
$InputObject.ShowMessageBox
$InputObject.ShowMessageBox
More like this