Script Execution Task

The Script Execution task allows you to run scripts written using the following scripting technologies:

  • Microsoft.NET (VB.NET and C#)
  • Windows Script Host (VBScript and JScript)
  • Windows PowerShell

The script may be stored in adTempus or it may be an external script file.

Although external script files can also be executed using a Program Execution task, executing them using a Script Execution task allows your script to interact with adTempus to write messages to the Job Log, get or set Job Variables, return a result code to adTempus to indicate the success or failure of the script, and more. See the Script Integration topic for more information.

Job Variables

The Script Execution Task sets the following Job Variables, which can be used by subsequent operations in the job:

Variable Description
ScriptResult The result returned by the script.
ADTTaskResult The result returned by the script.
ProcessExitCode For PowerShell scripts, the exit code from the PowerShell process.
ADTProcessID For PowerShell scripts, the Windows process ID (PID) for the PowerShell process.