Today we experienced issues during a Windows 7 deployment. The customer had SCCM 2012 R2 with a Windows 7 OSD and everything seemed to run perfect, except we had the following issues:
– The SCCM client didn’t fully install – it remains in a Site Mode = Unknown
– The client certificate was not assigned
– The _SMSTaskSequence folder created on C:\ was not removed
We’re deploying our images in a Greenfield scenario.
-No client certificate installed
After some investigation we discovered that the SCCM client was still in provisioning mode.
Just a little bug.
During a ConfigMgr 2012 R2 OSD Task Sequence, the ConfigMgr client is purposely placed in a provisioning mode. In this mode, the ConfigMgr client does not pick up policy from the MP. This is done so that advertised programs, software updates, and tasks targeted to existing client PCs do not run until the Task Sequence completes. If advertised programs, software updates, or tasks attempt to run while the Task Sequence runs it may interfere with the Task Sequence and cause it to fail.
A Reboot step in the OSD Task Sequence is accidentally set to restart into the WinPE boot image assigned to the Task Sequence instead of the full Windows OS. This will cause the Task Sequence to end in WinPE. Because the ConfigMgr client is actually installed as part of the full Windows OS and not WinPE, and because the Task Sequence ends in WinPE instead of the full Windows OS, it cannot properly take the ConfigMgr client out of provisioning mode.
Right after the “Setup Windows and ConfigMgr” step, add two “Run Command Lines” to set the registry values correctly. Here are the two commands to be run:
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\CcmExec /v ProvisioningMode /t REG_SZ /d false /f
REG ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CCM\CcmExec /v SystemTaskExcludes /t REG_SZ /d “” /f
This forced the client from going out of provisioning mode.
Problem was fixed!
When rolling out OSD in SCCM 2012 R2, one of the major drawbacks is that there is no feedback on how the rollout of the task sequence is functioning accept in the log files. We can build this information in the reports, but the Status Messages is really the preferred place for this.
This article will guide you on how to create a Status Message Query for a Specific OSD like the example below:
Ok so let’s get started!
First you need to get the deployment ID of the Task Sequence you wish to monitor.
-Go to Monitoring, Overview, Deployments. (The Deployment ID are not displayed by default so you have to select this) and write down the DeploymentID
Next we are going to build the Status Message Queries:
-Go to Monitoring, Overview, System Status, Status Message Queries, right click and choose Create Status Message Query.
-Give the Status Message Query a name, and click Edit Query Statement
-In the General Tab choose Show Query Language and paste in the following text;
Be sure to replace the collection ID into the one you looked up.
left join SMS_StatMsgInsStrings
on SMS_StatMsgInsStrings.RecordID = SMS_StatusMessage.RecordID
left join SMS_StatMsgAttributes
on SMS_StatMsgAttributes.RecordID = SMS_StatusMessage.RecordID
where SMS_StatMsgAttributes.AttributeID = 401 and SMS_StatMsgAttributes.AttributeValue = “P0120125“
and SMS_StatMsgAttributes.AttributeTime >= ##PRM:SMS_StatMsgAttributes.AttributeTime## order by SMS_StatMsgAttributes.AttributeTime DESC
-Click OK, and complete the wizard.
Now we’re ready to launch the Query:
-In the State Message, right click the query and select the date and time (default 1 hour ago), and click OK.
Wel we are ready to monitor the deployment like we would expect!