When deploying Windows clients or servers, you can use OS images to deploy customized and patched operating system installations in a uniform and seamless way. The challenge comes not from creating images initially, but from servicing them. The PowerShell module OSDBuilder simplifies this task.

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).

Using a task sequence in MDT to build and capture a Windows 10 image

Using a task sequence in MDT to build and capture a Windows 10 image

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.

Install-module OSDBuilder
Importing the OSDBuilder PowerShell module

Importing the OSDBuilder PowerShell module

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
Configuring execution policy and importing the OSDBuilder module

Configuring execution policy and importing the OSDBuilder module

Configure OSDBuilder folder structure

Use this command to set the target folder for OSDBuilder image builds:

Get-OSDBuilder -SetPath <your path>
Setting the OSDBuilder paths

Setting the OSDBuilder paths

Populate the folder structure in the target path set above:

Get-OSDBuilder -CreatePaths
Create paths in your OSDBuilder folder

Create paths in your OSDBuilder folder

Below is a look at the folder structure created in the target OSDBuilder path.

Folder structure created in the OSDBuilder path

Folder structure created in the OSDBuilder path

Import OS Media to OSDBuilder ^

Next, we need to import the operating system media we want to update and service.

Import-OSmedia
Importing Windows 10 media into OSDBuilder

Importing Windows 10 media into OSDBuilder

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.

Choose the edition you want to import

Choose the edition you want to import

The import process imports the media to the OSDBuilder folder. An output log is created and defined as well.

The Windows 10 image is imported into OSDBuilder

The Windows 10 image is imported into OSDBuilder

Updating OS media ^

Now to actually update our image. Use the following command:

Update-OSMedia -Download -Execute
Running the update command to download and execute updates

Running the update command to download and execute updates

Select the image you want to update and click OK.

Select the media to update

Select the media to update

OSDBuilder begins pulling down the updates and injecting them into the image.

OSDBuilder pulls down updates to update the media created

OSDBuilder pulls down updates to update the media created

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>
Create a new OSDBuilder Build task and enable .NET 3.5

Create a new OSDBuilder Build task and enable .NET 3.5

Select the image to enable the task and features

Select the image to enable the task and features

After enabling the task and features, you need to run the New-OSBuild -Download -Execute command.

The update task runs and adds the required features

The update task runs and adds the required features

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.

+2
0 Comments

Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2021

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account