Script Properties Window

The Script Properties Window contains the settings and code for a script that is stored in adTempus.

Property Pages

Script

Name

Provide a descriptive name for this script. If the script is Shared, a name is required and must be unique across all shared scripts. Otherwise the name is optional.

Shared

Check this option to allow the script to be shared among jobs, responses, etc. If the script is not Shared it will be available only for the object with which it is associated.

When a script is shared the Security page will be visible (see below), allowing you to specify permissions for the script.

Once you have checked the Shared option and saved the script, the script cannot be "unshared." If you no longer want it to be shared you must delete it and recreate it.

Description/Notes

Enter any extended descriptive information or notes for this script. There is no limit on the length of the text.

Language

Select the language that the script uses. The following languages are supported by default:

Included Script Libraries

Your script can make use of code defined in Script Libraries. Select any libraries you want to reference here.

The list of available libraries will depend on your chosen script language:

Included Scripts

For Windows PowerShell scripts, the Included Scripts section allows you to reference shared PowerShell scripts. Any scripts that you "include" will be written to a temporary folder (identified by the "ADTJobTemp" job variable) while your script is being executed, allowing you to call those scripts from your primary script.

The Call Shared Script drop-down menu in the code editor toolbar will list all scripts available to be referenced. When you select a script from the list, the editor will insert a call to that script at the current cursor location. The following syntax is used to call shared scripts:

& ($adTempus.JobVariables["ADTJobTemp"] + "\included script name.ps1")

Included Batch Files

For batch files, the Included Batch Files section allows you to reference shared batch files. Any batch files that you "include" will be written to a temporary folder (identified by the "ADTJobTemp" job variable) while your batch file is being executed, allowing you to call those batch files from your primary batch file.

The Call Shared Batch drop-down menu in the code editor toolbar will list all batch files available to be referenced. When you select a batch file from the list, the editor will insert a call to that batch file at the current cursor location. The following syntax is used to call shared batch files:

call "%ADTJobTemp%\included batch file name.cmd"

Referenced Assemblies

If you have selected one of the .NET languages (VB.NET or C#), your code may reference other .NET assemblies. The following assembly references are automatically added for all scripts, even though they are not listed here:

If your script makes use of any other assemblies, you must explicitly reference them.

Script

Provide the body of the script.

When you initially select the script language, the script body will be filled with a template script for you to use as a starting point. The contents of the template will depend on the context of the script (for example, the template for a Script Execution Task will be different than the template for a Condition Script).

In most cases, your script must return a result to adTempus to indicate the outcome of the script and tell adTempus how to proceed.

Click the new document button on the toolbar to reset the script body to the template for the selected language.

Limit script execution

Specify the maximum time (in minutes) that the script should be allowed to run. (This feature protects against "runaway" scripts.)

If this script is used in a Script Execution Task, which also allows you to specify a time limit, adTempus will use the more restrictive of the maximum run times specified for the Script and the Task.

Run isolated from other scripts

When this option is checked, this script will run in a host process that is not shared by any other scripts. See the Script Security and Isolation topic for more information.

Use 32-bit script host

When this option is checked, the script will be run as a 32-bit process when run on a 64-bit platform. If this option is not checked, scripts (other than Windows Script Host scripts) run as 64-bit processes. Use this option when your script has a dependency on a 32-bit components, driver, etc.

Windows Script Host scripts (VBScript, JScript) always run as 32-bit, regardless of whether this option is checked.

Validate

Click the Validate button to validate your script (not available for batch files or PowerShell scripts). adTempus will check to ensure that the code is valid.

Test

Click Test to execute your script (not available for batch files). If the script returns a value, that value will be displayed.

Security

The Security page appears only if the script is Shared.

The Security page is used to view or modify the security settings for this object. See the Security Editor topic for more information on editing security settings.

The following permissions apply to scripts:

Permission Description
Full Control Permission to perform all actions on the script.
List/Use Permission to use the script.
View Permission to view the properties of the script.
Modify Permission to modify the properties of the script.
Delete Permission to delete the script.
Administer security Permission to change the security settings for the script.
Change owner Permission to take ownership of the script.

Permission to create new scripts is controlled through the Script Security settings.