3. Creating a Task Sequence

A task sequence is a component
that you add to the deployment share. It is formulated as an XML file
but, unless you really want to, you never have to look at the XML file.
Instead, the Deployment Workbench leads you through the process of
creating it.

The task sequence provides a list of tasks that are performed in a specific order to complete the installation. As an example, Figure 1
shows the validation phase of a task sequence with the Validate task
selected. This task validates that the system has a minimum amount of
memory and minimum processor speed. It can also be configured to check
that a minimum amount of disk space is available and even verify that
the system that is being overwritten is either a client or a server.

Figure 1. Viewing the Validate task in a task sequence

Several task sequence
templates are available. Each of these templates is created with
underlying XML files provided by Microsoft. These are the available
templates:

Sysprep and Capture

Standard Client Task Sequence

Standard Client Replace Task Sequence

Custom Task Sequence

Lite-Touch OEM Task Sequence

Standard Server Task Sequence

Post OS Installation Task Sequence

Each template includes a
predefined group of steps organized in phases. When one task completes,
control is passed on to the next task until the operation completes.

As an example, Figure 2
shows part of the Standard Client Task Sequence that will be created in
the next exercise. This is a typical task sequence, and as you can see,
it can include a significant number of steps.

Figure 2. Viewing the properties of a task within a task sequence

In the figure, the State
Capture and State Restore phases are opened and the Generate
Application Migration File step is selected. Notice that the
command-line command is calling one of the scripts that were created
when the deployment share was added to the Deployment Workbench. Again,
all of this is part of the template. The State Capture phase will
automatically capture migration data (if any exists) on the computer,
and later the Restore User State phase will automatically restore
migration data.

Every step also has options, as shown in Figure 3.
You can use the Disable This Step option to disable an option
temporarily. As you're testing an image, you may want to try omitting a
step or two. Instead of deleting the step, you can disable it, and if
things don't work as you expected, you can easily add the step back by
simply enabling it. Disabled steps have a dimmed icon.

Figure 3. Viewing the options of a task within a task sequence

In addition, you can
modify the response to errors. Normally, an error condition will cause
the deployment to fail. However, you may want to ensure the installation
continues even if a step fails. For example, if the system is unable to
get updates, you may want to allow it to continue and have the updates
applied after the installation completes. You can also add advanced task
sequence conditions, as shown in the drop-down box.

Exercise: Creating a Task Sequence

Right-click Task Sequences and select New Task Sequence.

Enter Win7ThinImage as the task sequence ID. Enter Windows 7 Ultimate Installation
as the Task Sequence Name. Users will see this during the installation.
You can also add comments in the Task Sequence Comments section. Users
will also see this text during the installation.

Accept the default of Standard Client Task Sequence and click Next.

Select the Windows 7 Ultimate image from the Windows 7 Images install.wim operating system. This was added to the Deployment Workbench in an earlier exercise. Click Next.

On the Specify A Product Key page, select Do Not Specify A Product Key At This Time and click Next.

Enter the name of your organization (or Home Sweet Home) on the OS Settings page. Enter bing.com (or another website address) as the Internet Explorer home page. Click Next.

Review the information on the Summary page and click Next. When the operation completes, click Finish.

Leave the Deployment Workbench open to complete the next exercise.

Once a task sequence has been
created, it can be modified. You can right-click the task sequence
within the Deployment Workbench and select Properties to view the
details of the task sequence.

You can add additional tasks to a task sequence, as shown in Figure 4. Notice that there are several different groups of tasks. Each group has additional tasks that can be selected.

Figure 4. Adding additional tasks to a task sequence

In the figure, the Run
Command Line task is selected. This allows you to run any command
including batch files and scripts. The old scripting mantra comes to
mind—if you can imagine it, you can do it with a script. You have very
few limitations.

You can also remove tasks with the Remove button and modify the order of tasks using the Up and Down arrows.

3.1. Creating Windows PE Images by Updating the Deployment Share

Once the deployment share has
been created, you need to create the Windows PE images. The process is
referred to as updating the deployment share.

Exercise: Updating the Deployment Share

Review the information on the Options page, and accept the default of Optimize The Boot Image Updating Process. Click Next.

On the Summary page, click Next.

When complete, the following image files will have been created in the Boot folder of the deployment share:

Lite Touch Windows PE.wim

LiteTouchPE_platform.iso

You can then use these files to deploy images to systems. As an example, you could burn the .iso image to a CD and use it to boot a system. This is easily done in Windows 7 by right-clicking the .iso file in Windows Explorer and selecting Burn Disc Image.

When you boot to this media, it will start Windows PE, and ultimately you'll see a display similar to Figure 5. From here you can select Run The Deployment Wizard.

If you follow this
Deployment Wizard and click Begin at the end of it, it will partition
your system and you will lose all data on the system. Make sure you have
saved all of your data before clicking Begin.

Figure 5. Booting to the MDT Deployment Wizard

After clicking Run The
Deployment Wizard, you'll be prompted to enter domain credentials, pick a
task sequence, and select several other options from the wizard. You
can reduce the manual choices by modifying the answer files as much as
desired. After you've answered the last question for the wizard, you can
select Begin to start the installation.