Part III

Steps of the Task Sequence - A Walkthrough

Overview

Aaron has just completed the Create Task Sequence Wizard for use on new computers. Aaron now needs to review the task sequence created, and make adjustments as necessary to customize the task sequence for use at FourthCoffee.

Table of Contents

Overview

Review of the Task Sequence

Task Sequence Step 1: Restart in Windows PE

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 1: Options for Restart in Windows PE

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 2: Partition Disk 0 - BIOS

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 2: Options for Partition Disk 0 - BIOS

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 3: Partition Disk 0 - UEFI

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 3: Options for Partition Disk 0 - UEFI

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 4: Apply Operating System

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 5: Apply Windows Settings

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 6: Apply Network Settings

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 7: Apply Device Drivers

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 7: Options for Apply Device Drivers

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 8: Setup Windows and Configuration Manager

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 9: Install Updates

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 9: Options for Install Updates

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Task Sequence Step 10: Install Applications

What It Does

Implications

Best Practices

Troubleshooting

For More Information

Review of the Task Sequence

The task sequence has been created, and now requires review in order to determine if additional customization will be required in order to match the project goals for new computers to be used at FourthCoffee. Aaron will step through the task sequence to examine the results and make additional adjustments based on best practices.

Task Sequence Step 1: Restart in Windows PE

If the task sequence is started in an already installed operating system, restart into Windows PE

Figure 1: Restart in Windows PE Step of the FourthCoffee New Computer Task Sequence

What It Does

Based on theboot image specified in the properties of the task sequence, the task sequence enginewill download the boot image, stage it to the local hard drive,and change the boot configuration of the currently installed operating system to boot directly into this boot image. Based on the selection shown in figure 1 the end user will be notified with the message “A new Microsoft Windows operating system is being installed. The computer must reboot to continue” before the Configuration Manager Client Agent restarts the computer.

Implications

Operating system deployments can be initiated in different ways. Boot media, PXE (network) boot, stand-alone media, prestaged media, or from the existingoperating system thru the Configuration Manager Client Agent. A prerequisite for a successful operating system deployment is Windows PE (a light weight operating system loaded to a ram drive) which enables the execution of tasks like format and partition disk, apply operating system, and many more. These steps cannot be executed in an already installed operating system since it is not possible to format and partition the hard drive while in the running operating system. Regardless of delivery mechanism, the computer must boot into Windows PE in order to proceed with operating system deployment.

Best Practices

Ensure this step is in place to avoid task sequence errors.

Troubleshooting

Examine smsts.log located in C:\Windows\CCM\Logs\SMSTSLog or X:\Windows\Temp\SMSTSLog.

For More Information

Restart Computer Task Sequence Action Step
Restart Computer Task Sequence Action Variables

Task Sequence Step 1: Options for Restart in Windows PE

A simple condition based on a built-in variable ensures that this step is only executed if required

Figure 2: Options for Restart in Windows PEStep of the FourthCoffee New Computer Task Sequence

What It Does

Boot media, PXE (network) boot, stand-alone media, and prestaged media are deployment methods which will boot directly into Windows PE. In these cases the built-in variable _SMSTSInWinPE has a value orTRUE. The example shown in Figure 2: Options for restart in Windows PE, is configured to run the step only when the value of the _SMSTSInWinPE variable is false. If the condition is met, such that the variable _SMSTSInWinPE equalsFALSE, this task sequence step is executed. This step is skipped if the value of the variable is TRUE.

Implications

Without this condition a system that is running the task sequence will always restart into Windows PE even if it has been booted from PXE, Boot Media, Stand-Alone Media, or Prestaged Media.

Best Practices

Ensure this condition is configured so that the computer is only restarted into Windows PE if the task sequence is initiated by the Configuration Manager Client agent in the full Operating System.

Troubleshooting

Examine smsts.log located in C:\Windows\CCM\Logs\SMSTSLog or X:\Windows\Temp\SMSTSLog.

For More Information

Task Sequence Built-in Variables in Configuration Manager

Task Sequence Step 2: Partition Disk 0 - BIOS

This step will format and partition Disk 0

Figure 3: Partition Disk 0 - BIOSStep of the FourthCoffee New Computer Task Sequence

What It Does

As shown in Figure 3: Partition Disk 0 - BIOS, the system that executes the task sequence will be partition disk 0 with a 350MB System Reserved (Primary) partition and with a Windows (Primary) partition, which will use 100% of the remaining free disk space available.



For example, Disk 0 has 127 GB available disk space. The System Reserved partition is created with a size of 350 MB, and the remainder of the drive space is used in the Windows (Primary) partion.

Implications

For a successful Windows installation at least one primary partition is required. Factory new hard drives are not partitioned which prevents a Windows installation. The hard drive on which Windows is to be installed must be partitioned.

Best Practices

As a best practice, keep the default partition scheme, so that a System Reserved partition is created in addition to the Windows partition. The System Reserved partition allows you to manage and load other partitions (dual boot option), use security tools, such as WindowsBitLocker Drive Encryption and the use of recovery tools, such as Windows Recovery Environment (Windows RE). To have control and ability to access each partition later in your deployment it is highly recommended to store each partitions drive letter as a variable. This can be configured in the partition options (double click the partition of choice).

Figure 5: Properties of Partitioning Options

Troubleshooting

Examine smsts.log located in X:\Windows\Temp\SMSTSLog.

For More Information

Understanding Disk Partitions
Format and Partition Disk Task Sequence Action Step
Format and Partition Disk Task Sequence Action Variables

Task Sequence Step 2: Options for Partition Disk 0 - BIOS

Built-in variables are used to execute this task sequence step only if all conditions are met

Figure 6: Options for Partition Disk 0 - BIOSStep of the FourthCoffee New Computer Task Sequence

What It Does

Condition _SMSTSClientCache not exists ensures that Disk0 is not repartitioned if Configuration Manager used this drive to cache data, such as would be the case if an existing operating system was executing the task sequence and had downloaded files required by the task sequence into the client cache. Condition _SMSTSMediaType not equals “OEMMedia”ensures that Disk0 is not repartitioned if the task sequence has been started from a Prestaged Media. Condition _OSDMigrateUseHardlinks not equals “true” ensures that Disk0 is not repartitioned if user data has been stored via user state migration tools leveraging hard-links. Condition _SMSTSBootUEFI not equals “true” ensures that Disk0 is not repartitioned if the task sequence has been started on a system which is using UEFI mode, which requires a different partitioning scheme for the hard disk.

Implications

These are the default conditions for this task sequence step, and not all of them will apply to the new computer / bare metal scenario. These conditions are placed on this step to ensure that any chance of losing user data is avoided.

Best Practices

Ensure these conditions are in place to avoid unexpected task sequence results.

Troubleshooting

Examine smsts.log located in X:\Windows\Temp\SMSTSLog

For More Information

Task Sequence Built-in Variables in Configuration Manager

User State Migration Tool 4.0 Hard-Link Migration
Prestaged Media Operating System Deployments

Task Sequence Step 3: Partition Disk 0 - UEFI

This step will format and partition Disk 0

Figure 7: Partition Disk 0 - UEFIStep of the FourthCoffee New Computer Task Sequence

What It Does

Based on the settings shown in figure 7, when a system runs the task sequence, this step will set Disk 0 as a GUID Partition Table, with the following partitions:

-300MB - Windows (Recovery)

-500MB - (EFI)

-128MB - (MSR)

-Remaining space - Windows (Primary).



As an example Disk 0 has 127 GB total disk space. Note: (MSR) partition is hidden and will be only displayed if you use diskpart.

Implications

For a successful Windows installation at least one primary partition is required. Factory new hard drives are not partitioned which prevents a Windows installation. The hard drive on which Windows is to be installed must be partitioned.

Best Practices

As a best practice, keep the default partition scheme. To have control and ability to access “Windows (Primary)” partition later in your deployment it is highly recommended to store the partitions drive letter as a variable. This can be configured in the partition options (double click the partition of choice). Note: It is not possible to assign a variable to the “Windows (Recovery)”, “(EFI)” and “(MSR)” partitions.

Figure 9: Properties for Partitioning Scheme in UEFI

Troubleshooting

Examine smsts.log located in X:\Windows\Temp\SMSTSLog.

For More Information

Understanding Disk Partitions
Windows and GPT FAQ
Format and Partition Disk Task Sequence Action Step
Format and Partition Disk Task Sequence Action Variables

Task Sequence Step 3: Options for Partition Disk 0 - UEFI

Built-in variables are used to execute this task sequence step only if all conditions are met

Figure 10: Options for Partition Disk 0 - UEFIStep of the FourthCoffee New Computer Task Sequence

What It Does

Condition _SMSTSClientCache not exists ensures that Disk 0 is not repartitioned if Configuration Manager used this drive to cache data, such as would be the case if an existing operating system was executing the task sequence and had downloaded files required by the task sequence into the client cache. Condition _SMSTSMediaType not equals “OEMMedia”ensures that Disk0 is not repartitioned if the task sequence has been started from a Prestaged Media. Condition _OSDMigrateUseHardlinks not equals “true” ensures that Disk0 is not repartitioned if user data has been stored via user state migration tools leveraging hard-links. Condition _SMSTSBootUEFI equals “true” ensures that Disk0 is only repartitioned if the task sequence has been started on a system which is using UEFI mode.

Implications

These are the default conditions for this task sequence step, and not all of them will apply to the new computer / bare metal scenario. These conditions are placed on this step to ensure that any chance of losing user data is avoided.

Best Practices

Ensure these conditions are in place to avoid unexpected task sequence results.

Troubleshooting

Examine smsts.log located in X:\Windows\Temp\SMSTSLog

For More Information

Task Sequence Built-in Variables in Configuration Manager

User State Migration Tool 4.0 Hard-Link Migration
Prestaged Media Operating System Deployments

Task Sequence Step 4: Apply Operating System

Applies the operating system image package to the target drive

Figure 11: Apply Operating SystemStep of the FourthCoffee New Computer Task Sequence

What It Does

This task sequence step downloads the operating system image package referenced and applies the designated image index to the target partition. As shown inFigure 11: Apply Operating Systemindex 1 from the Windows 8.1 Enterprise operating system image will be applied to “Next available formatted partition”. This step will automatically create an operating system deployment answer file in the C:\Windows\panther\unattend\ folder named unattend.xml.

These are the default values of this unattend.xml file:



Component “Microsoft-Windows-Deployment” for a “RunSynchronousCommand” will execute “reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f” to disable user account page for the “specializeconfiguration pass”.



Component “Microsoft-Windows-International-Core” willset “SystemLocale” to “en-US” for the “oobeSystemconfiguration pass”.



Component “Microsoft-Windows-Shell-Setup” will set OOBE path “HideEULAPage” to “true”, “NetworkLocation” to “Work” and “ProtectYourPC” to “1” (1 Specifies that important and recommended updates are installed automatically) for the “oobeSystemconfiguration pass”.

Implications

This step ensures that the Operating System is applied to the system which is executing the Task Sequence. If the task sequence is initiated via Prestaged Media this step will not apply the Operating System Image package again, but will honor an operating system deployment answer file associated with the operating system deployment package.

Best Practices

Change destination to “Logical drive letter stored in a variable” and reference to the variable set during either the “Partition Disk 0 – BIOS” or the “Partition Disk 0 – UEFI” task sequence step. This will ensure the partion intended to host Windows will have the operating system image installed.

Figure 15:Specifying OS Image Location by means of variable populated in Disk partitioning step

An additional unattended answer file can be added in order to specify other deployment options like System and User Locale.


Note: Figure 16: Specifying custom unattended answer file shows a reference to a package named “Windows Setup Answer Files” which can contain multiple answer files. For example: Locale_Settings_DE.xml or DevTeamSettings.xml. It is very important to ensure the proper file name is specified, as there is no verification done within the task sequence editor. A wrong file name will cause Task Sequence Step 4: Apply Operating Systemto fail. As a best practice use “Windows System Image Manager” which is part of the Windows ADK to ensure the answer file contains valid syntax.

There is no built-in condition created for this step but it is possible apply different operating system image packages based on the value of task sequence variables. This can lead to high degrees of complexity in the task sequence, and possibly extra downloads of large operating system images that are not used. The best practice is to employ a single Apply Operating System step per task sequence if possible.

Troubleshooting

Examine smsts.log located in X:\Windows\Temp\SMSTSLog

For More Information

Apply Operating System Image Task Sequence Action Step
Apply Operating System Image Task Sequence Action Variables
Understanding Answer Files
Create and Modify Answer Files
Prestaged Media Operating System Deployments
Windows Unattended Setup Reference - Components

Task Sequence Step 5: Apply Windows Settings

This step adds information to the operating system deployment answer file (unattend.xml).

Figure 17: Apply Windows SettingsStep of the FourthCoffee New Computer Task SequenceWhat It Does



Component “Microsoft-Windows-Shell-Setup” will set “ComputerName”to the current value of variable OSDComputerName,or if it has no value to the value of _SMTSMachineName for the “specializeconfiguration pass”.





Component “Microsoft-Windows-Shell-Setup” willset “RegisteredOrganization” tothe value of variable OSDRegisteredOrgName. InFigure 17: Apply Windows Settingsthe values of “FourthCoffee Inc.”, “RegisteredOwner” to the value of variable OSDRegisteredUserName. In Figure 17: Apply Windows Settingsthe value of “FourthCoffee User”, “TimeZone” to the value of OSDTimeZoneand in Figure 17: Apply Windows Settingsit has the value of “W. Europe Standard Time” for the “oobeSystemconfiguration pass”.

Depending on the variable OSDRandomAdminPassword, the “AdministratorPassword” is set to a random value or the value of variable OSDLocalAdminPassword. Figure 17: Apply Windows Settings will use a random password for the “oobeSystemconfiguration pass”.

Implications

This step configure a local Administrator password, changes or add a product key which should be used for the deployment and configures the time zone.

Best Practices

If there is a need to use different product keys, consider using OSDProductKeyvariable.

For bare metal / new computer deployments with “unknown computer support” enabled, theOSDComputerName variable is empty by default.If the variable is not set, Configuration Manager uses the value of the variable _SMSTSMachineName. In Windows PE this will be “MININT-“ and a set of random alpha-numeric characters.Make sure to set OSDComputerName to a value which fits proper naming conventions.

Troubleshooting