SCCM OSD Task Sequence Steps by Step Ultimate Guide

6
SCCM OSD Task Sequence

Hello All, My name is Vishal Goyel, and this is my first post on this blog. I worked for several years as a Microsoft support engineer specialized in SCCM Task Sequence and OSD. In this post, you will learn step by step description of the SCCM OSD Task Sequence.

Introduction SCCM OSD Task Sequence

The OSD is the most widely used feature of ConfigMgr (SCCM). When it comes to troubleshooting OSD related issues, there is only one file SMSTS.log that can help us. However, the SMSTS.log file contains a lot of redundant information. To troubleshoot OSD related problems, learning to read SMSTS.log is very important.

Following are the main output which you are going to get out of this ultimate guide.

  • Learn how to understand SCCM OSD Task Sequence Steps & Process
  • Learn how to read SMSTS.log effectively
  • Learn how to troubleshoot SCCM OSD Task Sequence

Basic SCCM OSD Task Sequence Structure

In this post, I will be explaining all the steps in a basic Task Sequence and how to read SMSTS.log.

WinPE & PXE Boot Stage – SCCM OSD Task Sequence

Machine boots into WinPE and download the Boot Image. Once WinPE is initialized, you can find SMSTS.log in below location.

X:\Windows\Temp\SMSTSLOG\SMSTS.log

If you check the logs, at the very beginning, it will show the Boot Image files that it downloaded.

RAM Disk Boot Path: NET(0)\SMSIMAGES\LAB00005\BOOT.LAB00005.WIM    TSBootShell
Booted from network (PXE) TSBootShell

You can confirm from the logs if machine PXE booted or it booted using any media.

Download Variable Files

The first thing that machine does is to Download variable files from WDS server from RemoteInstall\SMSTemp\ folder and stores it as Variable.dat file locally on X drive under X:\SMS\Data folder.

Device has PXE booted   TSPxe
Variable Path: \SMSTemp\2017.03.16.13.41.39.0002.{F4304B8E-9855-401C-8168-D6BAF045258A}.boot.var TSPxe

NIC Card is InitializedSCCM MP Communication

Once variable files are downloaded, NIC card is initialized on the machine, and we can see IP Address assigned to the machine in the logs (shown below).

Loading Media Variables from "X:\sms\data\variables.dat"    TSPxe
Found network adapter "Intel 21140-Based PCI Fast Ethernet Adapter (Emulated)" with IP Address 192.168.1.32 TSPxe

Time Zone Update

Then the SCCM TS engine updates the Time information on the client machine.

Time zone: 480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,    TSPxe
.
.
New time: 2017-03-04 21:11:20:246 TSPxe
Current time: 2017-03-04 21:11:20.238 TZ: Bias:-0480

Connects with SCCM MP

The Machine then makes a connection with Management Point to download the base policies deployed to the machine.

CLibSMSMessageWinHttpTransport::Send: URL: PR2LAB.lab.in:80 GET /SMS_MP/.sms_aut?MPKEYINFORMATIONMEDIA 
Request was succesful.
New MP settings: TSPxe
         site=01P,01P, MP=http://PR2LAb.lab.in, ports: http=80,https=443 TSPxe
         certificates are received from MP. TSPxe
Unknown machine GUIDs: d1c4c682-cf2d-4245-af8d-20e9773f5f2d 0a156af7-e87d-4242-aa58-b3414486bd1c TSPxe
Downloading policy from http://PR2LAb.lab.in TSPxe
Initializing HTTP transport. TSPxe
.
.
.
Setting SMBIOS GUID = 7E25FE8F-F341-11E1-A20A-6C8447038046. TSPxe
Adding MAC Address A0:B3:CC:28:14:B7. TSPxe

Retrieving Policy Assignment from SCCM MP

List of Available SCCM OSD Task Sequence

Once NIC Card is initialized, and communication with Management Point is established, we can see list of deployed Task Sequences on the machine as shown below.

Policy Download & Resolving Dependencies

Once we select any specific Task Sequence from the above Wizard, machine downloads the policy for the same and proceed with resolving dependencies for all the content associated in the task sequence.

Downloading policy body LAB20000-PR100003-6F6BCC28. TSPxe
Preparing Policy Body Request. TSPxe
        Setting transport. TSPxe
        Setting policy location = http:///SMS_MP/.sms_pol?LAB20000-PR100003-6F6BCC28.1_00. TSPxe
Executing Policy Body Request. TSPxe
Using Authenticator for policy TSPxe
CLibSMSMessageWinHttpTransport::Send: URL: servername.fqdn.local:888 GET /SMS_MP/.sms_pol?LAB20000-PR100003-6F6BCC28.1_00 TSPxe
Parsing Policy Body.......
Source version for package......
Getting network access account......

Download SCCM OSD Task Sequence Content

Before SCCM Task Sequence execution starts, machine resolves the dependencies, which means, it checks for the Content Location for each package associated with the Task Sequence.

It will proceed with SCCM Task Sequence only if it can receive at least one content location for each package.

If it is not able to find any of the packages on the Distribution Points, it will fail to resolve the dependencies this is mostly due to Boundary issues or package distribution issues. (Content location for one package is shown below).

Launch TSManager.EXE

Once the dependencies are resolved, it invokes TSManager.exe that drives the entire Task Sequence.

The first thing that TSManager does if to parse all the steps in the Task Sequence. It reads through each step and checks the associated conditions with every step.

Once it is done with parsing the Task Sequence, it starts with TS execution.

We can see that is it starting the execution of the First step that is Partition Disk 0 -BIOS.

Before is executes the step, it evaluates conditions attached with the step, if any as shown below.

OSD Diskpart

The OSDDiskpart.exe which is injected into the Boot Image once we update the boot image on Distribution Point takes care of Disk Partitioning and based on the settings in the step, it creates the disk partitions.

Apply the Operating System Image

After partitioning the disk, it proceeds with the next step that is to Apply the Operating System image using SCCM OSD Task Sequence.

The OSDApplyOS.exe takes care of applying the OS to the Primary Partition.

Download OS WIM File

Before it can apply the OS, it need to download the OS WIM file; we can see from below screenshot that it is working on downloading the WIM file from the Distribution Point. It uses the Network Access Account(NAA) to download the file.

Wipes Primary Partition

Once, the image file is downloaded to C:\_SMSTaskSequence\Packages folder, before applying the OS, it again wipes the Primary Partition where it is designed to skip certain folder including C:\_SMSTaskSequence where all the contents are downloaded during the imaging process.

It then copies the Boot files to root of drive and BCD is written.

Additional Windows Configurations

During the process, it saves the initial windows configuration to C:\windows\panther\unattend\unaddend.xml file which will contain all the settings and will be executed at later point of time when machine boot into Full OS for the first time.

Then it proceeds with Apply Windows Settings step.

The OSDWinSettings.exe takes care of this process.

It loads the Unattend.xml and appends it with the settings that we have specified in the Task Sequence step for Apply Windows Settings.

Apply Network Settings

The next step that it runs is Apply Network Settings, OSDNetSettings.exe takes care of this process.

During this step as well, it appends Unattend.XML file with the specified settings.

NOTE!: Settings specified in Apply Windows and Network settings, are not “actually” applied on the machine when these steps are executed, the information is read from Task Sequence step and written to Unattend.XML. We can find the file under C:\Windows\Panther\Unattend folder.

Unattend.XML Injection

I am adding the sample Unattend.XML file; we can see that settings for Time Zone, Local Admin Password, Computer Name, and Domain join are written to the below file.

Windows and SCCM Client Setup

It now proceeds with Setup Windows and Configuration Manager step. During this step, the client agent files are downloaded to the machine, and Boot Manager is updated to Boot into Full OS which we just installed at the Apply Operating System Step. OSDSetupWindows.exe drives this process.

We can see that it is downloading the Client Agent files locally to the machine.

Reboot to Come Out of WinPE

Now, the machine needs to reboot so that I can come out of WinPE and boot into the Full OS. Before machine reboots, it creates SetupComplete.CMD file under C:\Windows\Setup\Scripts folder. If we check this file, we will see the following line:

%windir%\system32\osdsetuphook.exe /execute

The SetupComplete.CMD file is a Windows Setup file which is executed once Windows Setup completes. Due to this file, Task Sequence continues to run after the boot and booting into the Full OS.

We can see that before Rebooting into WinPE, Setup Windows and Configuration Manager step, requests for a retry.

During this reboot, Windows and Network Settings are executed from Unattend.XML file that was created earlier.

Once it has applied the settings, it deletes this file as it contains the Domain Join account and Local Admin Account password in plain text.

Loading the Registry hives, applying the drivers, setup of the entire OS is done during this phase.

Conclusion SCCM OSD Task Sequence

After the reboot, once Task Sequence is resumed, it completes the Configuration Manager client and continues with further steps like Application Installation or Software Update installation if any.

It finally moves the SMSTS.log to C:\Windows\CCM\Logs folder. Once the installation is completed successfully, it deletes C:\_SMSTaskSeuquence folder.

Bonus Tip

Have yo upgraded to SCCM 1902 version yet? Have you started using PowerShell Scripts without package or content?

If so, here is the tip bonus tip to find out the location where the PowerShell script must be stored in the Windows 10 client machine.

X:\Windows\Temp\SMSTSPowerShellScripts

Resources

6 COMMENTS

  1. Vishal, Your first blog rocks
    Waiting for future blog posts … you are great teacher … osd was never my strong point but this blog post from you made it easy to understand and troubleshoot osd related issues. I’m confident that I can handle osd issues better

  2. Thanks Vishal this has helped me better understanding the whole task sequence process. Looking forward to any future postings.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.