Navigation:  Actions > Miscellaneous > PowerShell >

PowerShell Action Command Tab

Previous pageReturn to chapter overviewNext page

This tab of the PowerShell Action action configures information about the script to be run.

 

powerShell

 

Command script: Specifies the script to invoke (required).  The filename of a file can be provided, or the contents of a script can be entered in the second field.

 

Notes:

Single parenthesis characters must be doubled (%%) to not be treated specially by VBP.  Strings within parentheses (i.e., %PATH%) will also be expanded by VBP if not escaped.
Bracket characters [ and ] normally denote a script expression to be inserted into a field; to insert literal brackets, use two bracket characters [[ or ]].
The exit code of the command processor will be stored in the RUNPROGRAM_EXITCODE temporary macro.
By default, PowerShell will not execute local unsigned scripts, and temporary script files created by this action are not signed.  To enable PowerShell to execute local unsigned scripts, start PowerShell (running as admin) and enter the command Set-ExecutionPolicy RemoteSigned.  Or sign your PowerShell scripts and specify the script filename above.