- Increase IIS performance with HTTP/3 in Windows Server 2022 - Fri, Jan 14 2022
- Redirect user profile folders (documents, pictures, etc.) to OneDrive for Business - Thu, Jan 13 2022
- Action1 RMM: Managing and monitoring IT for hybrid workforces - Tue, Jan 11 2022
The challenge with Windows images is that they need to be changed and updated from time to time. Versions of applications installed in the image may need to be changed, additional components such as drivers may need to be added, and security patches and other Windows updates may need to be installed.
If your Windows image becomes outdated, the time needed to install updates and changed components can offset any efficiencies gained by using the image in the first place.
Online vs. offline servicing ^
Updating applications and Windows installations requires servicing an OS image. There are generally two ways to service your Windows images: online and offline. Online servicing of Windows images generally means that you are performing a build and capture of the Windows image, either manually or using a solution such as Microsoft Deployment Toolkit (MDT).
On the other hand, offline servicing is favored for its ability to automate the injection of Windows updates into the Windows image. IT admins can use PowerShell or DISM to perform offline servicing of Windows images, such as installing the latest patches. One downside of offline servicing is that it cannot service desktop applications installed in the Windows image.
Offline servicing of a Windows image with OSDBuilder ^
OSDBuilder is a PowerShell module used to perform offline servicing of Windows images. Using the method provided by OSDBuilder, you can service the Windows image and then import it into MDT or other solutions, such as SCCM, and use it for deployment or even an upgrade task sequence.
OSDBuilder creates an answer file that is referred to as a task. The task records all the information necessary to update the Windows image, and no interaction is needed with the guest operating system in the image. Multiple OSDBuilder tasks can be run serially.
Installing OSDBuilder ^
In addition to the functionality provided, OSDBuilder is easy to install, as it is a PowerShell module that you import into your PowerShell environment.
After installing the module in PowerShell, you will want to bypass the execution policy and then import the module.
Set-ExecutionPolicy Bypass Import-Module OSDBuilder
Configure OSDBuilder folder structure
Use this command to set the target folder for OSDBuilder image builds:
Get-OSDBuilder -SetPath <your path>
Populate the folder structure in the target path set above:
Below is a look at the folder structure created in the target OSDBuilder path.
Import OS Media to OSDBuilder ^
Next, we need to import the operating system media we want to update and service.
Select the image you want to use to create the customized image deployment. The Windows 10 ISO contains several images, so you need to select one for use.
The import process imports the media to the OSDBuilder folder. An output log is created and defined as well.
Updating OS media ^
Now to actually update our image. Use the following command:
Update-OSMedia -Download -Execute
Select the image you want to update and click OK.
OSDBuilder begins pulling down the updates and injecting them into the image.
Create an OSDBuilder OSBuild task ^
As mentioned earlier, OSDBuilder uses tasks to provide the automation needed to service the Windows image offline. To create one and, for example, enable the .NET 3.5 SP1 Windows component, use the following command:
New-OSBuildTask -TaskName <your task name> -EnableFeature <features you want to enable>
After enabling the task and features, you need to run the New-OSBuild -Download -Execute command.
Workflow after creating the image
Now that your Windows 10 image is created and ready with patches and components enabled, you can import the image using MDT and serve it out using WDS. In addition, the OSDBuilder can create an ISO image from the updated WIM image, which you can use to boot an ad hoc installation of Windows 10.
Wrapping up ^
OSDBuilder is a great utility that allows effective offline servicing of your Windows images, including installing patches, adding Windows components, and more. It is easy to install as a simple PowerShell module and quickly provides value in managing your Windows images for production deployment.
Subscribe to 4sysops newsletter!
It is not a replacement for other solutions, such as MDT and SCCM. However, it nicely complements these solutions by providing a robust, automated way to keep your offline images updated.