Blank Task Sequence Variables

Blank Task Sequence Variables

A new feature of Configuration Manager 2007 R2 is the ability to define a Task Sequence Variable on a Collection or individual resource without a value. Then when the Task Sequence initiates on a system, a dialog box is presented where you can set the value of the variable. A quick example is in order to demonstrate this:

  1. Create a TS. Use the intended variable in a conditional or in any other way that variables can be used. For this example, I simply set a condition on the install of XML Notepad: it will only be installed if the TS variable InstallXMLNotepad is set to Yes.

    The Task Execution Condition

    The Task Execution Condition

  2. Advertise it to a collection.
  3. Set the InstallXMLNotepad variable on the targeted collection but do not defined a value; i.e., leave it blank. To set a variable on a collection, right-click it and choose Modify Collection Settings. The second tab, named Collection Variables, allows you to manage the variables for the collection.
    Create a New Collection Based Task Sequence Variable

    Create a New Collection Based Task Sequence Variable

  4. Launch the Task Sequence on a resource in that collection.
  5. Before any tasks are launched, you will be presented with the following dialog box:
    Task Sequence UI for All Blank Task Sequence Variables

    Task Sequence UI for All Blank Task Sequence Variables

  6. Double-click on the variable whose value you want to set (if you have more than one variable with a blank value, they will all be shown in the list box).

    Task Sequence UI for Setting a Blank Task Sequence Variable

    Task Sequence UI for Setting a Blank Task Sequence Variable

  7. Type in the value and press OK.

That’s it. The variable is now set and will be used in the conditional we set in step 1. The major shortcoming is in plain user friendliness: the raw variable name is presented to the user without any type of prompt and you cannot constrain or validate the value entered in any way. But, if your process is well defined and documented, these shortcomings are relatively small.

Error Codes

Next Article

Error Codes

No Comments

Cancel