OSDBuilder – Reference Image on Steroids

Reading Time: 6 minutes

The people who are following me on Twitter might have noticed that I am playing around with OSDBuilder lately. What is OSDBuilder? It is a PowerShell module from David Segura which allows you to do apply several customizations to a Windows OS image. Before I was using OSDBuilder there always have been the same repeating challenge in a four-week cycle: How is the fastest and most reliable (automated) way to deploy my machines with the latest updates after M$ Patch Tuesday? First let’s have look what options do we have without OSDBuilder?

Option #1  – WSUS
You are deploying a standard task sequence and applying the Windows Updates from your WSUS server during the OSD installation.

2019-03-18 07_13_52-Window

Option #2 –  Integrate Updates into Workbench
Automate the download of Cumulative Updates from Windows Update Catalog and import the .msu or .cab files into the Deployment Workbench.

2019-03-18 07_16_08-Window

Option #3 – PowerShell
You are using a PowerShell Wrapper to install the .msu files during the OSD installation.

2019-03-18 07_19_10-Window

What do all the mentioned solutions have in common?

They are too slow! Option #2 and Option #3 can take up to 40 minutes only for installing the latest Cumulative/Adobe Security Updates. We better don’t talk about Option #1 WSUS  because this will take for a decade or maybe even more.. This is a horror for everyone who just wants to rollout a new machine for staging and is totaly unacceptable in my opinion.

How can OSDBuilder help?
With the framework from David we can inject the latest updates into the install.wim and deploy our machines directly with the latest patch level. We only need to apply the “update procedure” once and can use the modified install.wim for n-machines. But it is not only about injecting updates you also get the possiblity to add .NET Framework 3.5 and language packs which is going to save you valuable time during the deployment because DISM is not the fastest piece of technology.  You don’t need to worry about downloading updates files and checking dependencies from previous updates. Everything is automated. I am going to show you how to do some basic stuff with OSDBuilder. Please check the OSDBuilder Docs for detailed informations.

Is it possible to automate the whole process?

Of course. I wrote a PowerShell script which you can find in my Github repository. Create a schedulded task and run the script monthly after Microsoft released new updates. Before using the script make sure to fit the custom variables to your environment.


Result: A new OS-Build got created and imported into the MDT Deployment Workbench. It will always create a new folder “OSDBuilder”+ DateStamp under Operating Systems.

2019-03-19 09_30_34-mRemoteNG - confCons.xml - MDT-01


The following steps are showing the manual process of using OSDBuilder.

Install OSDBuilder &  Import the Operating System

Install-Module -Name OSDBuilder -Force
Import-Module -Name OSDBuilder -Force

2019-03-18 07_49_38-Window

Mount the Windows Server ISO. I am using Windows Server 2016. If you already have the sources inside your MDT share you can create a SUBST to skip the ISO mount action > subst e: “C:\Hydration\Operating Systems\VLSC-W2k16”


Choose the version (Standard|Datacenter) you would like to import and get a coffee because this will take some time. Multiple selections are possible.

2019-03-18 07_57_22-Window

2019-03-18 07_59_47-Window

Import Language Packs

Create a folder with the release ID of your OS under “C:\OSDBuilder\Content\IsoExtract
Example: Windows Server 2016 1607 Language

Copy the folders from the  M$ Language Pack ISO containg the .cab files to “x64\langpacks”

2019-03-19 06_09_26-mRemoteNG - confCons.xml - MDT-01


Update the OS-Media

Now it is time to inject the latest available cumulative updates. This going to take about 30 minutes. Make sure that the server can reach Windows Update becaue the script is going to download the needed system updates.

Update-OSMedia -Download -Execute -SkipComponentCleanup

If you are going to install PVS Target Device Driver during a Task Sequence make sure you skip the “Component Cleanup”! This will break your installation and the VM will end up in a boot loop to Windows recovery mode. Thanks to Mario Hohlmesser who found this out the hard way (me included).


Create an OSBuildTask

The next step is to create an OSBuildTask. You can specify what you want to include for example: .NET 3.5, Language Packs, drivers and enable optional features.

New-OSBuildTask -TaskName Build-031819 -EnableNetFX3

2019-03-18 08_41_37-Window

Select the language packs to apply.