Task sequences provide the mechanism for performing multiple steps or tasks on a client computer at the command-line level without requiring user intervention. Task sequences do not represent a full scripting language. Task sequences can be advertised to computers. Task sequences cannot be advertised to users.
After a task sequence is created, it can be accessed in the Configuration Manager 2007 console by selecting the Task Sequences node. The task sequence node and its task sequences are replicated to child sites in the Configuration Manager hierarchy. If the task sequence cannot locate a referenced image or package on a distribution point, the task sequence will contain broken references and will fail when it is run. You can also create subfolders to manage or group task sequences. These subfolders are also replicated to child sites.
Terminology for Task Sequences
The following list of terms describes task sequences and the components of task sequences:
- The command part of a single step within a task sequence. There are two types of task sequence actions: Custom Actions and Built-in Actions.
- Custom action
- A command-line string supplied by the administrator that will run a command on the Configuration Manager 2007 client computer.
- Built-in action
- A Configuration Manager 2007 action that will perform a specific action on the Configuration Manager 2007 client computer.
- A parameter within a task sequence step or task sequence group that determines whether the Configuration Manager 2007 client should process the action.
- The basic component of a task sequence or task sequence group. Each step can contain an action and an optional check for the conditions assigned to a task.It is not required that you group task sequence steps; however, using groups improves the readability of the task sequence and provides better error handling.
- A logical arrangement of multiple steps within a task sequence.
A task sequence group consists of a name and an optional check for
the conditions assigned to a task.
Note Each task sequence group can contain additional nested task sequence groups.
- Task sequence
- One or more steps or groups that are linked sequentially to perform an operation or task.
Creating a New Task Sequence
You can create a new task sequence by using the Task Sequence Wizard. For more information about creating custom task sequences, use the following link How to Manage Task Sequences. The wizard contains built-in task sequences and custom task sequences that can perform many different tasks. You can create task sequences that will perform tasks from capturing and installing operating system image packages to changing a registry setting.
Moreover, you can create task sequences that will allow you to install an existing image package, build and capture a reference operating system image, or create a custom task sequence that will perform a customized task using variables. Custom task sequences can be used to perform specialized operating system deployments or to perform other custom actions or steps.
Custom and built-in task sequences can also be used to run multiple task sequence steps on a target computer that will perform a series of steps to achieve an installation. Task sequence names do not need to be unique.
After you have completed the Task Sequence Wizard, the new task sequence object is created and is visible in the results pane of the Configuration Manager console.
Using Task Sequences Outside Operating System Deployment
Although task sequences are essential for operating system deployment, they can also play a vital role in other Configuration Manager 2007 tasks. The power of task sequences lies in their flexibility and administrators can use these to configure client settings, distribute software, update drivers, edit user states, and perform other tasks independent of operating system deployment.
Task Sequences and the Network Access Account
In Configuration Manager 2007, task sequences run only in the context of the local system account. The Network Access account is used to access required packages located on Configuration Manager 2007 distribution points. You must configure the Network Access account correctly or the task sequence will fail because it will not be able to access the required Configuration Manager 2007 packages to complete the associated task. In Configuration Manager 2007 R2, the task sequence can be modified to run as a different account. For more information about the Network Access account, see About the Network Access Account.
|The Network Access account is never used as the security context for running programs, installing updates, or running task sequences; however, the Network Access account is used to access the associated resources on the network.|
When you use a boot image to initiate an operating system deployment, Configuration Manager 2007 uses the Windows PE environment, which is not a full operating system. The Windows PE environment uses an automatically generated, random name that is not a member of any domain. Without configuring the Network Access account properly the computer may not have the necessary permissions to access required Configuration Manager 2007 packages to complete the task sequence.
For more information about configuring the Network Access account, use the following link: How to Configure the Network Access Account.
You can provide access control to specific task sequences. You can set user rights on individual task sequences in the same fashion as other Configuration Manager 2007 objects using the Security tab. For more information about assigning user rights, see How to Assign Rights for Objects to Users and Groups.
To create a new task sequence or folder, you must have Create or Administer permission to the Task Sequences folder. You must also have at least Read permission to objects, such as the packages the task sequence will reference. To advertise a task sequence, only Read permission is required to the task sequence.
Advertising a Task Sequence
You can advertise a task sequence to any Configuration Manager 2007 collection. By default, task sequence advertisements are made available to sub collections.
Each target computer will receive the task sequence by way of the advertisement and will run the task sequence according to the settings specified in the advertisement. Task sequences do not contain associated files or programs. Any files referenced by a custom task sequence must already be present on the target computer or reside on an accessible distribution point. An advertised task sequence will be run on client computers even if the program or package has already been installed.
The Configuration Manager 2007 client will use normal Configuration Manager 2007 client polling methods to locate the task sequence advertisement. For more information about Configuration Manager 2007 client polling methods, use the following link: How to Initiate Policy Retrieval for a Configuration Manager Client
You cannot advertise a task sequence that references a nonexistent program.
For more information about advertising a task sequence, see How to Advertise Task Sequences.
Editing a Task Sequence
You can use the Task Sequence Editor to update or change the run-time actions associated with an existing task sequence. You can also change the order of the task sequence steps by using the task sequence editor to change the priority assigned to each task sequence step. You can also specify how the task sequence will handle errors for failed task sequence steps by specifying that the task sequence should continue if there is an error. You can also add conditions to the task sequence by using If statements on the Options tab.
If the task sequence has any unassociated references to a package or a program as a result of the edit, you will need to fix the reference, delete the unreferenced program from the task sequence, or temporarily disable the failed task sequence step until the broken reference has been fixed or removed.
Task Sequence Steps and Actions
Steps are the basic components of a task sequence. They contain the commands that run on a target computer that perform tasks such as installing an operating system, creating a registry entry, or installing a Configuration Manager 2007 software package.
Task sequence steps are processed sequentially and the conditions assigned to each task sequence step are evaluated. If the step is applicable to a Configuration Manager Client the action is initiated. The next task sequence step will not proceed until the previous action has completed. A task sequence is considered complete when all steps have been completed or when a failed step causes the task sequence to end prematurely.
|By default, a task sequence will fail after one step or action fails. To continue after a task sequence step failure, edit the task sequence, click the Options tab, and then select Continue on error.|
Task Sequence Groups
Groups are multiple steps within a task sequence. A task sequence group consists of a name and an optional check for the conditions assigned to a task.
Creating groups will enable you to combine multiple steps within a task sequence. Groups can be nested within each other, and a group can contain a mixture of steps and subgroups. Groups are useful for combining multiple steps that share a common condition. You can also configure the group failure behavior as you do with individual steps.
To allow the task sequence to continue to the next step if one of the steps fails, use the Options tab to set the task sequence to Continue on error. The following table and example show how the Continue on error option works.
In this example, there are two groups of task sequences containing three task sequence steps each.
|Task Sequence Group/Step||Continue on error setting|
Task Sequence Group 1
Continue on error selected
Task Sequence Step 1
Continue on error selected
Task Sequence Step 2
Task Sequence Step 3
Task Sequence Group 2
Task Sequence Step 4
Task Sequence Step 5
Task Sequence Step 6
- If task sequence step 1 fails, the task
sequence will continue with task sequence step 2.
- If task sequence step 2 fails, than the task
sequence will not run task sequence step 3 but will continue to run
task sequence steps 4 and 5 which are in a different task sequence
- If task sequence step 4 fails, no more steps
will be run, and the task sequence will fail because the
Continue on error setting has not been configured for task
sequence group 2.
You must assign a name to task sequence groups, although the group name does not need to be unique. You can also provide an optional description for the task sequence group.
Running Task Sequences
In Configuration Manager 2007 SP1 and earlier, task sequences always run by using the local system account, so there is no option of running a task sequence for each individual user that logs in. In Configuration Manager 2007 R2, the task sequence command-line step can be modified to run as a different account. The task sequence will check for referenced packages prior to running. If a referenced package is not validated or available on a distribution point, the task sequence will return an error for the associated task sequence step. If an advertised task sequence has been configured to download and run, all dependent programs are downloaded to the Configuration Manager 2007 client cache. The necessary packages and programs are obtained from distribution points, and if the Configuration Manager 2007 client cache size is too small or the program cannot be found, the task sequence will fail and a status message will be generated. You can also specify if the content should be downloaded as needed by selecting Download content from distribution point and run locally, or you can use the Run program from distribution point option to specify that the installations should run across the network.
If a dependent package or program cannot be located by the task sequence, an immediate error will be returned if the advertisement is optional. However, if the advertisement is mandatory the Configuration Manager 2007 client will wait for the necessary package or program to be replicated to the appropriate distribution point.
|If a task sequence step requires the client computer to restart, there must be an available formatted disk partition at the time of the computer restart; otherwise, the task sequence will fail regardless of any error handling setting.|
When a task sequence dependent object, such as a software distribution package, is updated to a newer version, any task sequence that references the package is automatically updated and will reference the newest version.
|All task sequences are checked for possible dependencies and availability on a distribution point prior to initiating. When an object that an existing task sequence depends on is deleted, an error is issued. For more information about how to identify missing task sequence objects use the following link: Log Files for Operating System Deployment|
When a task sequence completes successfully or fails, an entry is placed in the Configuration Manager 2007 client history. There is no method to cancel or halt a task sequence once it has initiated on a computer.
Importing and Exporting Task Sequences
A task sequence created in one Configuration Manager 2007 site can be exported and then imported to another Configuration Manager 2007 site or hierarchy. If you use task sequences from a site other than the one in which it was originally created, make sure that any referenced images or packages are available in the new site, or the task sequence that is dependent on that package will fail. To export task sequences right-click the task sequence, and then click Export. You will be prompted to provide a name for the task sequence and the location to save the exported task sequence. When you export a task sequence, it does not include the referenced images or packages. If an imported task sequence cannot locate the referenced packages on a distribution point, the task sequence will contain broken references and will fail when it is run. Do not attempt to edit a task sequence after it has been exported. The task sequence must be imported into a Configuration Manager 2007 site before it can be edited. Restrict access to the exported file to help prevent tampering.
|Because of changes to the task sequence schema to allow a task sequence to be run as a specified account, Configuration Manager 2007 R2 task sequences that use the Run As feature cannot be imported by a Configuration Manager 2007 site server. Configuration Manager 2007 R2 task sequences that use the Run As feature and that run on Configuration Manager 2007 will fail.|
To import a task sequence, click Import in the Actions pane, and then browse to the location of the task sequence file.
Creating Media for Task Sequences
You can write task sequences and the related files and dependencies to a DVD or CD set or a USB flash drive. Removable media will allow you to run the task sequence on computers that do not have a network connection to your Configuration Manager 2007 site. Task sequence media can be used only in the same site where the media was created. For more information about creating media use the following link: How to Deploy an Operating System Image Using Media
You can create three types of removable media:
- Stand-alone. Stand-alone media contains the
task sequence and all associated objects necessary for the task
sequence to run. Stand-alone media task sequences can run when the
Configuration Manager Client has limited or no connectivity to the
network. Stand-alone media can be run in two ways: first, if the
target computer is not booted, the Windows PE image associated
with the task sequence is used from the stand-alone media and the
task sequence begins. Second, the stand-alone media can be manually
started if a user is logged on to the network and initiates the
Important Stand-alone media task sequence steps must be able to fully run autonomously from the network; otherwise, the task sequence step will fail. For example, a task sequence step that requires a distribution point to obtain a package will fail; however if the necessary package is contained on the stand-alone media the task sequence step will succeed.
- Boot. Boot media contains the necessary files
to start a target computer so that it can connect to the
Configuration Manager 2007 infrastructure and the target computer
can determine which task sequences to run based on the target
computer's collection membership. The task sequence and dependent
objects are not contained on the media; instead, they are obtained
over the network from the Configuration Manager 2007 client. This
method is useful with new computer or bare metal deployments, or
when no Configuration Manager 2007 client is present on the
- Capture. Capture media is used to capture an
operating system image that has been configured and created outside
of the Configuration Manager 2007 infrastructure. Capture media can
contain custom programs that can run prior to a task sequence. The
custom program can interact with the desktop, prompt the user for
input values, or create variables that will be used by the task
You should specify a password that is assigned to the media and must be entered by a user to access the files contained on the media. If you specify a password to be assigned to the media, a user must be present to enter the password at the target computer.
When you run a task sequence using media, the specified computer chip architecture contained on the media will not be recognized and the task sequence will attempt to run even if the architecture specified does not match what is actually installed on the target computer.
|If the chip architecture contained on the media does not match the chip architecture installed on the target computer the installation will fail.|
Using Media in Configuration Manager 2007 Native Mode Environments
When you use media created by Configuration Manager 2007 to deploy operating systems in native mode, you will need to include a public key infrastructure (PKI) certificate on the media if task sequences require communication with the native mode site's management point. Without this certificate, authentication to the management point will fail, and operating system deployments will not succeed. For more information about using certificates in native mode for operating system deployment media use the following link: How to Manage Native Mode Certificates and Operating System Deployment
Additionally, for the certificate contained on the media to be trusted by the management point, the site must also be configured with a root certification authority for the certificate. For more information about configuring the site with the root certification authority, see How to Specify the Root Certification Authority Certificates for Operating System Deployment Clients.