Troubleshooting and Upgrading AD FS FarmsTroubleshooting and Upgrading AD FS Farms

Reduce OSD Time


1. Set High Performance Power Plan

  • This has been proven in multiple environments to save 20% – 50% on certain steps. You will see noticeable savings on the download & apply OS. By default while the system in in WinPE, configmgr will a balanced power setting. so making sure we use all resources we can see a major win from this piece. I also set this to prevent systems from going to sleep during the TS.


2. Set SMSHostAgent Startup Options

  • The SMS Host Agent (CcmExec) service is set to a delayed start by default. Every time you restart the system during the OSD Process and you see the “initializing System Center Configuration client” you are just costing time. In my environment this message would usually last 2 – 5 minutes each restart. Once I implemented this we noticed the configmgr client would only take < 15 seconds to initialize, that is a savings of 800% – 2000% for this specific task sequence action.
  • Frank Rojas whom is one Microsoft CSS Lead OSD Engineer has let me know that this has POTENTIAL for failures in a TS. So please know that if you use this step please understand THIS IS NOT SUPPORTED! I have seen this work successfully in environments for a few months at a time, and then it just stops working. One scenario for this is the ConfigMgr client starts up automatically before network connections are available. This means the ConfigMgr client evaluates to assume it is now on an internet instead of intranet. The Configmr client next look for the CMG for MP and DP purposes, and then steps start to fail in the TS. So if you run into a problem like this go ahead and disable the associated steps and start the TS again.


3. Set SMSTSRebootDelay

  • This will change the default behavior from 30 seconds to 0 seconds and occur immediately


4. Set manual Restart times (for displayed messages)

  • When you add a restart computer step into the TS by default the time is set to 60 seconds. Simply by un-checking the “Notify the User before restarting” box you now force the restart immediately. Should you need to actually display a message you can just reduce the amount of time this box is displayed.


5. Eliminate unnecessary restarts / steps
  • I have seen several customer environments that had 8 or more restart steps in their TS. Whenever you have a restart in a TS you can assume usually 2 – 5 minutes are added to the total TS time. I would recommend investigating the status messages for exit codes indicating a restart is necessary before you start modifying a customers task sequence. Many of my peers usually have only 2 or 3 restarts in their TS as they have streamlined their deployments.
  • MVP Mick Pletcher has a great post on how to handle restarts in your TS. Basically add a condition statement to check if the system needs a restart you can read about it and implement it here


6. Patch & Maintain the WIM
  • This will of course help you out on the install software update steps in your TS. The more patches that are in your WIM, the less to process later. I tend to bake office and patches into the WIM. I’m not a fan of having really thick images loaded with several 3rd party apps that can be installed during TS.
  • Make sure you aren’t deploying a wim with multiple unnecessary Indexes. Read this article by my guy MIke Terrill on Putting your Indexes on a diet. Last year (Summer 2018) leveraged this for a customer in the past and saw time savings because of the reduced WIM. Starting in 1902 you can now import a single Index for your OS image, instead of all indexes that was part of the Media.
  • We recommend to leverage OSDBuilder By David Segura for creating and servicing your WIM.
  • Hopefully by now you are using OSDBuilder. BUT if you are not and you are offline servicing your WIM with configmgr you can now in 1902 start to remove superseded patches. So make sure you stay current on your SCCM ConfigMgr.


7. Verify that boundaries are efficient
  • This should be another no-brainier idea, but you will be surprised. I’ve seen customer environments where a machine from the east cost USA would pull down images from the middle east….like there is literally an entire ocean between the distribution point and the workstation..


8. Prevent OOBE From connecting to Windows Update
  • I’ve seen in the SMSTS.LOG before that a system I was imaging was trying to reach out to windows update. Some places you are confined to image from certain vlans only and you can block this communication at the firewall. In my TS I modify the Registry to prevent this action from occurring. Unfortunately this was something changed in my TS a long time ago so I did not grab a screenshot. I can edit this post when I get around to making the next revision of changes in the updated WIM. (Thanks Todd)


9. Cache Content!
  • Pre-Cache: This is how we are performing our in place upgrades. No more do we have to download content for each package being called, but we already have this stagged locally.
  • Peer Cache: This is another way of getting content instead reaching out to the distribution piont you can contact a local cache source on your sub-net which may get the content faster.


10. Run Scripts!
  • Historically if we wanted to run a powershell script we would have to create a package. I’ve seen other environments that have several scripts running during the task sequence, but they have multiple packages for different scripts, instead of everything consolidated into 1. With CurrentBranch 1902 you can run powershell scripts directly from the task sequence without first creating, and distributing a package. Make sure your clients are on 1902 version to make use of this feature.



On my test experiment the OSD process would take around 100 – 110 minutes. For me that high of a turn around time is just unacceptable.

Reduce OSD time
I like to use Thomas Larsens OSD Dashboard when I keep track of some Task sequence information like this. Please check out his blog here. I believe this dashboard is a must have for every SCCM admin.

Screenshot after changes OSD Time. We see below that this has been reduced to 36 minutes. I am positive I can actually get this to 32 minutes or less, but for now I will leave good enough alone. This test shows that we have cut the OSD time to less than 1/3 of the time. I’ve been in other environments where they had the image process take 24+ hours, but that is mainly boundary related issues. This does not include all of the possible time saving techniques such as per-staging the content (IPU Scenario)



Task Sequence Modifications


Power settings: I kind of have this littered everywhere in my TS before major time consuming steps like apply OS, install patches, install apps, etc.

Name: Set High Performance Power Scheme
Command Line: PowerCfg.exe /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
SMS Host Agent Start-Up Properties: This only needs to go in 1 place right after you install the SCCM Client. 

NameSet SMS Host agent to start immediately
Command Linecmd /c sc config “CcmExec” start= auto


Dynamic Variables: I have all my variables set here. These are for resiliency, and speed.


Prevent OOBE from Downloading Drivers:

NameMount the Offline HKLM File
Command Linereg load HKLMOffline C:WindowsSystem32ConfigSoftware

NameSet DODownloadMode
Command LineREG ADD HKLMOfflineSOFTWAREPoliciesMicrosoftWindowsDeliveryOptimization /v DODownloadMode /t REG_DWORD /d 100

NameSet DoNotConnectToWindowsUpdate
Command LineREG ADD HKLMOfflineSOFTWAREPoliciesMicrosoftWindowsWindowsUpdate /v DoNotConnectToWindowsUpdateInternetLocations /t REG_DWORD /d 1

NameUnmount the Offline HKLM File
Command Linereg unload HKLMOffline


End of Task Sequence To Change Back (if wanted)
NameSet SMS Host agent to start delayed
Command Linecmd /c sc config “CcmExec” start= delayed-auto
Name: Set Balanced Power Scheme
Command LinePowerCfg.exe /s 381b4222-f694-41f0-9685-ff5bb260df2e


This customer has unnecessary restarts in their OSD design, and were not very streamlined. Things in this version of the TS can be easily baked into the WIM on the next image refresh with the build/capture TS i provided for the customer. There are things that are slow during this TS like install Visual J+, or .Net Framework 3.5 that would reduce the total OSD time if baked into image. 

Other things to reduce OSD Time: 
I still have unnecessary install software update/restart steps in the TS as a sort of catch all. These systems come out fully patched, but are left enable in case I do not get time to capture and test a new wim one month. Stay on the latest version of ConfigMgr there are so many major enhancements coming out with every release!


1905 TP:

chris buck

Founder of SCCMF12TWICE.

Lead SCCM Architect/Engineer for various environment all over the world. Primarily focused on reducing complexity of enterprise environments. This also includes migrating customers to the cloud, and to windows 10 with servicing upgrades.

Strong believer in data driven operations. If we can identify problems with analytics, and visualize it to management we can reduce the amount of problems, at the same time improve customers experience, reducing support costs.


5 × 5 =

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

  • sc is really sc.exe so no need to launch it using cmd.exe — that's like inception.

    Nice list of steps though

  • Will it be possible to share the task sequence? I would like to import and make necessary changes and test within the lab. Appreciate your help in sharing the task sequence.

  • Great work. Thank you for the contribution. 3 quesitons:

    1.What are those time stamps on each step in your TS? like 4.2,6.3 etc.?
    2.Is there a better tool for viewing the SMSTS logs? I like doing the forensics in the logs, but cmtrace is a bad experience.
    3.Did i read somewhere that 1710 made some cleanup to the logs so they have only the most meaningful info in them?

    I have many of these steps in my TS and they really help alot. I JUST realized the other day i could set restart delay to 0. There are some things you are doing in the registry that i have not seen before though.
    My Task sequences install Office 2016 and a ton of apps, and are still under 50 minuntes when everything goes right.

  • 1. I try to label each step so I can look at log files/the TS easier…the problem is keeping up with it lol.

    2. I like to use cmtrace so Idk any other tools out there that are as good.

    3. I'm not following.

    Yeah, it looks like your TS is already in great shape.

  • no worries! I know I am not all that great when it comes to writing. I"m surprised I have not received as many calls for clarification etc.

    Anyways. I appreciate your time in reading the blog, and I'll work to better explain items in future posts!.

    • Hi Christopher, could you *please* post a picture of your full task sequence so we can see where all thee steps go? My org would really like ti implement your method, but I need to be sure where everything goes before I do.

      Thank you!

  • I'd be wary of changing the ccmexec service startup type to auto. If I recall correctly, Microsoft experimented with changing the startup type by default in a previous version of ConfigMgr. I think it was SCCM 2012 R2 CU3, and that maybe they changed it back in CU4 and via hotfix for CU3. We noticed that the automatic start type caused OSD application installs to sometimes fail if, for instance, the network was not yet available before the service started.

    It's been 2 or 3 years since I tried to change the service startup type in SCCM and have not tried in current branch. If you try it, just be on the lookout for a similar issue. You might be able to get away with it in some environments but not others.

    For reference, see

  • I was not aware of this potential issue, but I can see how it can occur.

    I TS variables in my TS to add resiliency for network hiccups but could work for this too.

    great research! You the man!!!

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.