WDS slow WINPE boot speed with SCCM 2012 and 2016

Default out-of-the-box booting on WinPE with SCCM 2012/2016 is quite slow; I’ve seen boot times up to 20 minutes.
This is because System Center Configuration Manager 2012/2016 uses small TFTP block sizes of 512 bytes.

This behavior is set because it’s compatible with all network configurations; but the result is that the PXE boot speed can be very slow using Operating System Deployment with SCCM.

Slow WINPE with SCCM

To increase the PXE boot speed, we need to modify TFTP Block Size.
In the registry editor:
Path :    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\DP
Name :  RamDiskTFTPBlockSize
Type :    REG_DWORD
Value :   16384 (decimal)

Change RamDisk TFTPBlockSize
16384 is the maximum supported value.
If it is bigger, you can have corrupted data.
However I recommend to do some test with values :
– 4096,
– 8192,
– 16384.
Depends on your network configuration, a lower value can be used.

Restart the Windows Deployment Services Service. (WDS)

Problem solved!

The location of SMSTS log files during SCCM OSD

The location of the SMSTS.log moves around depending on the phase in the deployment via SCCM/OSD.To troubleshoot this it’s important to know where the log files are located.

If you enable “Command Support” during the OSD you can press the F8 key during the OSD.

Before your hard drive is formatted and partitioned
x:\windows\temp\smstslog\smsts.log

After HDD format
x:\smstslog\smsts.log and then copied to c:\_SMSTaskSequence\Logs\Smstslog\smsts.log

You can check for the below three locations for smsts.log file after OSD and when the OS is installed.
Before SCCM agent installed
c:\_SMSTaskSequence\Logs\Smstslog\smsts.log

If Windows OS is 32-bit, after SCCM agent installed
c:\windows\system32\ccm\logs\Smstslog\smsts.log

If Windows OS is 64-bit, after SCCM agent installed
c:\windows\sysWOW64\ccm\logs\Smstslog\smsts.log

You can check for the below two locations for smsts.log file after the task sequence is complete.
If Windows OS is 32-bit, after Task Sequence has finished running
c:\windows\system32\ccm\logs\smsts.log

If Windows OS is 64-bit, after Task Sequence has finished  running
c:\windows\sysWOW64\ccm\logs\smsts.log

 

SCCM – Cannot edit the object, which is in use by ‘domain\SCCM-ADMIN’ at site P01

During the configuration of an OSD our SCCM 2016 console crashed and afterwards we suddenly found ourselves without any ability to make changes.

The error was “Cannot edit the object, which is in use by ‘domain\SCCM-ADMIN’ at site P01”.Locked screen
Because of the console crash SCCM still thinks that the object is being edited.
This is because ConfigMgr 2012/2016 handles editing of objects through something called “SEDO” or “Serialized Editing of Data Objects.”.
Locked objects can be found in the SEDO_LockState table in the ConfigMgr database.

You can locate the record in question by searching for LockStateID that’s not zero, or by the user ID that ConfigMgr says is editing the object (‘AssignedUser’).
On the database server run the following query against the CCM_01 database:
select * from SEDO_LockState where LockStateID <> 0

Locked in SCCM

Use the LockedID with the appropriate information to remove the record related to the object*.
DELETE from SEDO_LockState where LockID = ‘<LockID of the record identified in the previous query>’
ScreenHunter_66 Jul. 01 10.42
Once the record is removed, you should be able to modify the object.

 

Add or remove local user in SCCM 2012 OSD Task Sequence

Sometimes it is necessary to add of remove a local user to your Windows image (like notebooks which must be used at external locations). You can create an image for SCCM with local users, but then you have another image with a different configuration. I think it’s cool everything can be managed with just one image, so here is a small tip to add an user from the task sequence.

The command net user can be used to add a local user, or delete it:
Add user
net user username password /add

Delete user
net user username /delete

Look at http://support.microsoft.com/kb/251394 for the right parameters.

I want to delete a user account which was created during a manual image built.
net user username /delete

Next thing is to add the command line to the task sequence:
1. Edit the Task Sequence
2. Choose Add, General, Run Command Line
Note:
The user can’t be added as all steps in the Install Operating System group are executed in WinPE.
The creation of the user to the end of the TS, after setting up the SCCM client and after restoring the user data.
ScreenHunter_264 Dec. 10 11.21
3. Type or paste the command in the Command line: box

 

Deploy custom MS updates/hotfixes in SCCM 2012 via WSUS

Some updates and enterprise hotfixes are not displayed in WSUS and therefore not applicable in WSUS. This blog post shows how to streamline these update/hotfixes in WSUS and SCCM.

The trick is that “out of the box” you can’t deploy this. Some updates do not sync to WSUS and your SCCM software update point (SUP) automatically. There are some simple steps you can take to get it there.
This example adds KB2670838 in the update list.

Lets start,
-On your central site, start the Windows Server Update Services admin console
Note that changing things in the WSUS console can mess up the WSUS integration; Do so carefully.
-Go to updates select Import Updates to launch a webpage to the Microsoft Update Catalog.
ScreenHunter_232 Nov. 27 13.17
-Search on KB2670838 and add all that you are interested in getting for your environment
-Check import directly into Windows Server Update Services is selected then hit the import button.
Another box will come up tracking the download and show success when completed
Note that the updates are feature Packs
ScreenHunter_233 Nov. 27 13.19
-Give the WSUS services a full sync by clicking Synchronize Now
ScreenHunter_234 Nov. 27 13.21

Next we are setting up the SCCM part
-Start the SCCM 2012 R2 Console
Verify that your SCCM site is set to sync “Feature Packs” classification, because that is what this is (as compared to “service packs” or “security updates”).
-Check Feature Packs in Administration, Sites, Software Update PointScreenHunter_237 Nov. 27 13.24

-Once that download is complete you can sync SCCM by clicking Synchronize Software Updates ScreenHunter_235 Nov. 27 13.22
Once the Sync is complete you should see the updates in SCCM to deploy as you would any other update

-In the Console select Software Library, Software Updates, Automatic Deployment Rules
-Choose Create Automatic Deployment Rule from the Ribbon
ScreenHunter_238 Nov. 27 13.25
-Give the ADR a name like ADR: Custom Updates, select a template, a collection.
ScreenHunter_239 Nov. 27 13.26
-Setup the ADR as a regular ADR, only choose in the software updates section, the product like Windows 7 and the article ID 2670838
ScreenHunter_241 Nov. 27 13.27
-After finishing the ADR choose Run Now to get a full Sync.
ScreenHunter_249 Nov. 27 13.39

-After the full Sync you see the updates in the WSUS directory of SCCM
 ScreenHunter_251 Nov. 27 13.39
Next part is integrating the update is the OS image

-Start the Software Library, Operating Systems and right click the media you want to update, choose Schedule Updates
ScreenHunter_252 Nov. 27 13.40
Search 2670838 in the choose update and notice that (if its applicable) the update appears in the image.
ScreenHunter_253 Nov. 27 13.41
Apply the update and notice in the OfflineServiceMgr.log the update is applied and afterwards is installed in the installed update tab on the image
ScreenHunter_255 Nov. 27 13.49
ScreenHunter_256 Nov. 27 13.59

That’s it!

SCCM 2012 R2 client is stuck in provisioning mode

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.

Configmanager Client error
-No client certificate installed

Provisioning Mode SCCM
 After some investigation we discovered that the SCCM client was still in provisioning mode.

Cause:
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.

Solution:
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!

Detail monitoring SCCM 2012 OSD task sequence in the SCCM console

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:
OSD logging SCCM 2012 R2
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 DeploymentIDDeploymentID

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
Message Query SCCM 2012
-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.

select
SMS_StatusMessage.*,
SMS_StatMsgInsStrings.*,
SMS_StatMsgAttributes.*,
SMS_StatMsgAttributes.AttributeTime
from SMS_StatusMessage
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

Query
-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.
ScreenHunter_29 Apr. 16 14.26

 

Wel we are ready to monitor the deployment like we would expect!
OSD logging SCCM 2012 R2