PhenixID

Run Powershell Command

Version: 1.0

Category: Input

Extended Category: Powershell

Action Package: Standard Actions

Description

Launch and run a PowerShell command, without any input from the powershell execution.

Parameter

Description

Example

PowerShell File Path

File path to PowerShell.exe. Default: file path in Global Parameter POWERSHELL_PATH. It is mandatory to set either this parameter or the global parameter.

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

PowerShell Command

[Optional] The Powershell command. Use either this or the parameter below.

Get-ADComputer -Identity pas-training

Only Run Once (true/false)

[Optional] If the powershell script should run once and not one time for each object in the session. If using SESSION() in arguments, the values from the first session object will be used when running only once. Default value=true.

false

Milliseconds to Sleep

[Optional] The number of milliseconds to sleep between executions of the command when runing one execution for each session object. Default value=0.

30

Error Message Attribute

[Optional] If the Powershell script returns any error, the message will be placed in this attribute. If no error, the attribute will be created with no value. Leave blank to not create any error message attribute.

ps-error

Stop on Failure (true/false)

[Optional] If any error occurs, stop the action from further execution and return with an action failure. (true/false) Default value = false.

false

Use Cases

Example 1: Run command

This action will run a command that do not take any parameters. It will therefor only need to run once.

The powershell file path has been entered in global parameter POWERSHELL_PATH.

Parameter

Value

PowerShell File Path

[BLANK]

PowerShell Command

Get-ADComputer -Identity pas-training

Only Run Once (true/false)

true

Milliseconds to sleep

[BLANK]

Error Message Attribute

[BLANK]

Stop on Failure (true/false)

false

				

DISCLAIMER
Information provided in this document is for your information only. PhenixID makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.

The origin of this information may be internal or external to PhenixID. PhenixID makes all reasonable efforts to verify this information.

PhenixID - support.phenixid.se