Automation Workshop includes Execute script Action that allows integration of JScript, VBScript and PowerShell scripts as well as batch files directly into the Task.
The script examples provided here will give a good insight how to use various scripts to create custom automation within the feature rich framework of Automation Workshop.
The scripting in Execute script Action of Automation Workshop has its own specifics. First, it must be noted that the script takes its input from Variable Wizard dynamic values. Everywhere a variable is required, a dynamic value has to be added directly to the script code.
Second, the data communication with other scripts is based on screen output. The screen output of the script can be retrieved by using Variable Wizard from subsequent Execute script Action. It is possible to retrieve either full screen output or any of the first six output lines separately.
And finally, as the window of the script in execution is not visible, the scripting support in Execute script Action is limited to non-interactive scripts (i.e. scripts that do not require user interference for their completion). If, however, the script will ask for user input or other interaction, the result will be undefined. When use of interactive scripts is necessary, try using Run DOS / Cmd command Action.
Execute script Action supports JScript (view examples).
Execute script Action supports VBScript VBScript (view examples).
Execute script Action supports PowerShell scripts (view examples).
[Console]::OutputEncoding = [Text.Encoding]::Utf8
Set-ExecutionPolicyparameter has to be changed. PowerShell has to be run as administrator privileges (just running from administrator account is not sufficient). Type the following code into the PowerShell window:
PowerShell.exe -commandand sets required execution policy from batch file script.
Execute script Action includes Batch file support (view examples).
While the scripting support is very versatile and allows achieving almost unlimited results, due to script complexities, it is better regarded as a workaround for cases where the standard features of Automation Workshop can not yet provide a friendly and easy solution.
If you have any questions, please do not hesitate to contact our support team.