Skip to content

PowerShell - Process Steps

Run PowerShell Script

Runs a PowerShell script. This step allows for bidirectional passing of script variables and DevOps Deploy properties.

NameTypeDescriptionRequired
Command Line OptionsStringCommand-line options for the PowerShell session. Changing command-line arguments can affect plug-in functionality. The -File parameter is reserved. The -Command parameter is reserved if the value is a string. See Microsoft documentation for further details.No
PowerShell HomeStringIf the PowerShell command is in the system path, specify the PowerShell command name. Otherwise, specify the full path to the PowerShell command.Yes
PowerShell ScriptStringAccepts any PowerShell syntax. The prefix _IBMUCD is reserved for internal use; all methods and variables with this prefix are subject to change. Use dot source notation to call a script from a file. For example: . C:/HelloWorld.ps1. Use the standard DevOps notation for input properties. For example: $YourVar=${p?:deployProperty}. Use the command Set-StepOutputProperty to set an output property. For Example: Set-StepOutputProperty OutputPropName OutputPropValueYes
Successful Exit StatusStringThe error status to set when the script completes successfully. The value must be between -128 and 127. This sets the exitCode property, which is used in the post-processing script. If you use -128 for an error status, change the value from the default. Using 0 may cause false negative statuses.No