Navigation:  IM Sequencer > Schedule tasks > Conditions > Custom condition >

Powershell condition

Previous pageReturn to chapter overviewNext page



The Powershell condition is a custom condition that will execute a Powershell command to check if a condition is met.


       General setting
       All general custom condition settings are described below, to develop your own condition plugin read more here.


The custom condition is called "Traxion.IM.Scheduler.Plugins.Powershell.PowershellCondition"



The following parameters apply for the Powershell condition.


Script file
This points to a Powershell script with the extension *.ps1, you can configure this or use the Script text parameter


Direct execute script
If you configured the Script file parameter then the contents will be read from the file and then executed, when you set this to true the Script file will be started directly without reading the contents.


Script text
This can contain the direct Powershell commands to be executed, you can configure this or use the Script file parameter


Script parameters
The parameters that need to be provided to the Powershell script file, this does not apply for the Script text parameter
The parameter format is like "encryption=true;remote=false;url=http://localhost", multiple parameters are splitted using ';', if the parameter has no value ommit the '=' and only provide the parameter name.


Custom isValid variable
You can set this global variable to indicate that the condition is or is not valid, set a global variable name like this "$global:<variableName>" in your Powershell command where the variable name is the same as the value configured for the "Custom isValid variable" parameter. The value can be set to a integer (0 or 1) or to a boolean value ($true or $false).
If this variable is not used then the condition will evaluate to true if the Powershell result was "0", indicating nothing went wrong.


Script credential variables

       If the script needs to have a specific username or password it can be configured and stored encrypted, this way you do not need to store the username/password in the script directly.

       You can access the configured username and password via the global variables like "$global:ScriptUserName" for the username and "$global:ScriptUserPassword" for the password.


Bypass execution policy
Set to true to bypass the powershell execution policy for this condition only. You can also disable or change the powershell execution policy on the system by opening a powershell console using administrator rights and type 'Set-ExecutionPolicy Unrestricted', see for more information about the powershell execution policy.
                               Powershell condition settings



Page url: