In Configuration Manager 2007, operating system deployment task sequences are created and edited by using a Windows Management Instrumentation (WMI) class-based object model.

Changing task sequences by updating the task sequence XML is not supported. You will only need the XML when exporting the task sequence to different site. The XML is stored in the SMS_TaskSequencePackage Server WMI Class Sequence property.

Task Sequence Packages

A task sequence is packaged in an instance of the SMS_TaskSequencePackage Server WMI Class class and there is a single package for each task sequence. The package is advertised to client computers by using an instance of the SMS_Advertisement Server WMI Class class. To associate the task sequence package with the advertisement, you set the SMS_Advertisement Server WMI Class PackageID property to the SMS_TaskSequencePackage Server WMI Class PackageID property.

SMS_TaskSequencePackage Server WMI Class derives from SMS_Package Server WMI Class and can be used in the same way that packages are used. For more information, see Software Distribution Packages.

For more information about creating a task sequence package, see How to Create an Operating System Deployment Task Sequence Package.

For more information about creating advertisements, see How to Create an Advertisement.

Task Sequences

To create and manage task sequences, Configuration Manager provides a number of WMI classes that represent a task sequence, task sequence steps (actions and groups) and step conditions.

The key WMI classes are:


The SMS_TaskSequence class represents an individual task sequence. You can either create new instances of SMS_TaskSequence, or you can use the method SMS_TaskSequencePackage.GetSequence to populate an SMS_TaskSequence with an existing task sequence.

If you create a new SMS_TaskSequence, you must associate it with a SMS_TaskSequencePackage. Otherwise, Configuration Manager is not aware of its existence.

The class property SMS_TaskSequence. Steps is an array of SMS_TaskSequence_Step derived classes. These steps are processed sequentially when the task sequence is run.


The two types of steps, action and group, derive from the SMS_TaskSequenceStep class. The two types of steps are the SMS_TaskSequence_Group class for groups and the SMS_TaskSequence_Action derived class for the Configuration Manager built-in, or custom, actions.

A step has a number of properties that you can set.

Property Description


A condition that must be met for the step to be processed. This in an instance of the SMS_TaskSequence_Condition class.


If set to true, the task sequence will continue to the next step when an error occurs. Otherwise the task sequence will propagate the failure back to the parent. If the parent is a group, the parent group's ContinueOnError property is evaluated. If the parent is the task sequence root, the task sequence will fail.


If set to true, the step is processed. Otherwise, the step is not processed.

The step also has a Name and Description property.

This documentation refers to steps when the procedure is applicable to both actions and groups. For example, How to Remove a Step from an Operating System Deployment Group is a task that is applicable to both action removal and group removal.


Configuration Manager defines a number of built-in actions that are defined in classes derived from the SMS_TaskSequence_Action class. For example, the action that allows you to specify a command line is the SMS_TaskSequence_RunCommandLineAction class.

The built-in actions are named SMS_TaskSequence_ActionNameAction where ActionName is the name of the built-in action. They are documented in Operating System Deployment Server WMI ClassesOperating System Deployment Server WMI Classes.

In addition to the properties that are inherited from SMS_TaskSequenceStep, a derived action inherits the following properties from the SMS_TaskSequenceAction class that you can set:

Property Description


Specifies the operating environment that the action can be run in. Valid values are "WinPE", "FullOS", "WinPEandFullOS.


Specifies the time-out period for the action, in seconds.


The SMS_TaskSequence_Group Server WMI Class class represents a set of steps that are processed sequentially. SMS_TaskSequence_Group Server WMI Class Steps property is an array of SMS_TaskSequence_Step Server WMI Class classes that represent the group's steps. Because a group step is derived from SMS_TaskSequence_Step Server WMI Class, there can be further child groups within the steps.


Each SMS_TaskSequence_Step Server WMI Class and the derived classes (actions and groups) can have an associated condition that must be met for the condition to be run. For example, you may want to process a step on a computer with Microsoft Office 2007 installed. Additionally, you may also want to further restrict the step to the Windows Vista operating system.

For the condition to be processed, the SMS_TaskSequenceStep class Enabled property must be set to true.

Within a task sequence step, the SMS_TaskSequence_Step Server WMI Class Condition property contains a SMS_TaskSequence_Condition Server WMI Class object that holds the condition. The condition is made up of one or more operands that are defined in an array of SMS_TaskSequence_ConditionOperand Server WMI Class derived classes by the Operands property. Each operand is an expression that must evaluate to true, for the step to be processed - a logical and operation.


Individual expressions are defined in SMS_TaskSequence_ConditionExpression Server WMI Class derived classes.

SMS_TaskSequence_ConditionExpression derives from SMS_TaskSequenceConditionOperand.

For example, you would use SMS_TaskSequence_SoftwareConditionExpression Server WMI Class to define an expression for Microsoft Office 2007. The class used to define an expression for Windows Vista would be SMS_TaskSequence_OSConditionGroup Server WMI Class.

Nested Expressions

You can define more complex conditions containing nested expressions with SMS_TaskSequence_ConditionOperator Server WMI Class. This class also derives from SMS_TaskSequence_ConditionOperand Server WMI Class.

For example, you can form the condition Exp1 and (Exp2 or Exp3) by adding the following condition operands to a task sequence step's SMS_TaskSequence_Condition Server WMI Class instance's Operand array property.

  • SMS_TaskSequence_ConditionExpression (Exp1).

  • SMS_TaskSequence_ConditionOperator (nested expression Exp2 or Exp3).

The SMS_TaskSequence_ConditionOperator Server WMI Class Operands array property contains the expressions Exp2 and Exp3 and the SMS_TaskSequence_ConditionOperator Server WMI Class Operator property contains the desired operator. In this case or.

The operands in the task sequence step's SMS_TaskSequence_Condition Server WMI Class Operand array property are automatically compared with the and operator to evaluate the condition. The expressions in the SMS_TaskSequence_ConditionOperator must have an operator defined by the Operator property.

Since the SMS_TaskSequence_Condition Server WMI Class Operands property is an array of SMS_TaskSequence_ConditionOperand Server WMI Class classes, you can create more complex conditions such as Exp1 and (Exp2 or (Exp3 and Exp4)).

For more information about conditions, see How to Add a Condition to an Operating System Deployment Task Sequence Step.

See Also

Send comments about this topic to Microsoft.