Task Sequence Variables
Task sequence variables allow you to compare a variable to a static value using a variety of conditions, such as equal, greater than, and less than. The Task Sequencer maintains numerous variables that you can use in these tests. For example, the Task Sequencer defines a variable called DeploymentMethod that indicates the method of deployment. One possible value of DeploymentMethod is UNC. For a complete list of variables that the Task Sequencer maintains, see the Microsoft Deployment Toolkit Reference in the MDT 2010 documentation.
To add a variable to an item's Conditions list, perform the following steps:
- On the Options tab, click Add and then click Task Sequence Variable to display the Task Sequence Variable Condition dialog box.
- In the Variable box, type the name of the variable you want to test.
- From the Conditions list, choose one of the following conditions:
- Not equals
- Greater than
- Greater than or equals
- Less than
- Less than or equals
- In the Value box, type the static value you want to compare to the variable using the condition specified in the previous step.
Use if statements to combine variables into bigger expressions. For example, create an if statement that evaluates to true only if all the conditions it contains are true (the same as a logical AND), or create an if statement that evaluates to true if any of the conditions it contains are true (the same as a logical OR).
To add an if statement to an item's Conditions list, perform the following steps:
- On the Options tab, click Add and then click If Statement to display the If Statement Properties dialog box.
- In the If Statement Properties dialog box, choose one of the following options and
then click OK:
- All conditions (AND)
- Any conditions (OR)
- From the Conditions list, select the if statement added in the previous step and then add task sequence variables to it as described in the previous section.
If you choose All Conditions, all variables added must evaluate to true for the group or step to run. If you choose Any Conditions, the group or task will run if any one of the variables added evaluates to true.
Note You can nest if statements to create complex logic. If you are familiar with Boolean logic, represent Boolean expressions as if statements in the Conditions list.
In this tutorial:
- Developing Disk Images
- Getting Started Developing Disk Images
- Prerequisite Skills and Lab Requirements
- Installation Media
- Capturing Images Using Microsoft Deployment Toolkit
- Creating and Configuring a Deployment Share
- Adding Operating Systems
- Adding Applications
- Specifying Application Dependencies
- Adding Packages
- Creating Task Sequences
- Editing a Task Sequence
- Configuring Group and Task Properties
- Configuring the Options Tab
- Task Sequence Variables
- Operating System Versions
- Updating the Deployment Share
- Capturing a Disk Image for LTI
- Preparing Images Manually
- Customizing Microsoft Deployment Toolkit