Activities
- PS Script
PS Script
This activity runs a powershell script.
Activity Parameters
The PS Script activity parameters can be provided by manual inserted values or via IN arguments or variables:
...
- DateTime Object (type: string): outputs the input object as a string.
Parameters
Name | Description | Type |
---|---|---|
scriptCode | Enter the Powershell script code that you want to be executed. For example: mkdir "C:\\FoundMediaSoftware " (this command creates a folder with the specified path) | System.String |
FilePath | Enter a Powershell script file. This parameter takes precedence over the 'Script code' parameter. | System.String |
Read-Only Output
Name | Description | Type |
---|---|---|
Output | Outputs a collection of 'PSObject' type objects | System.Collections.ObjectModel.Collection`1 [System.Management.Automation.PSObject] |
OutputRows | Outputs the number of 'PSObject' type objects returned by the execution of the script | System.Int32 |
Activities
PSscript
This activity allows the user runs a powershell script.
Activity Parameters
PSscript
Input Values
This activity has two parameters. The parameter "Script file" takes precedence over the parameter "Script code". This means that whenever both parameters are filled, the "Script file" parameter will be executed and "Script code" parameter will be ignored. For showcase purposes,only "Script code" parameter will be used as input.
...
The "ScriptCode" IN arguments is defined with default value in the Parameters section,Arguments tab in Task Designer panel.
Output Values
The output values are stored in two defined variables. Given the case, OUT arguments may be used in the same manner. If the output values are not to be passed outside the task, variables need not be defined, but instead set the "Track Outputs" property for this activity to "Yes" and the output values will be displayed in the Tracking Data without storing them in variables/OUT arguments.
...