N-central Help

Run Powershell Script

Runs a Powershell script.

You will not be able to run a policy in Automation Manager that contains a Powershell script larger than 10MB.

Privileges

Normal

Input Parameters

Name Type Required Description
Script String Yes  
Input Parameter List User Configurable No

Input parameters are created by the user.

If a password contains a single quote (apostrophe), the single quote must be replaced by two single quotes when entering the password into a password field. For example, if the password is ab'cd, enter ab''cd (where '' is two single quotes and not a double quote) into the password field.

If the input parameter is a Number type, and the value is the maximum allowable (1E+308), it will not be valid when run in SolarWinds N-central.

Output Parameters

Name Type Required Description
Output Parameter List Configurable No Output parameters are created by the user.
Result Number   Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Input Parameters User Configurable No

Optionally create input parameters to be used within the Script.

If a password contains a single quote (apostrophe), the single quote must be replaced by two single quotes when entering the password into a password field. For example, if the password is ab'cd, enter ab''cd (where '' is two single quotes and not a double quote) into the password field.

Script String Yes Paste PowerShell script contents.
Output Parameters User Configurable No

Optionally create output parameters to be used within the Script.

Any value other than 0 will cause a policy run with the Run Powershell Script object to fail.

Run as Current Logged on User Boolean No Optionally run the script as the current logged on user.