Automated Master Image Creation



When deploying a new computer or server image using MDT / SCCM, one of the most time consuming parts is Windows Update. So if the reference image isn’t getting updated on a regular basis, the deployment time will increase each and every month.

To achieve the fastest deployment the reference image should be automatically updated with the recent Windows Updates at least once a month.

Automated Master Image Creation-02

The recommended platform for building references images is the free Microsoft Deployment Toolkit, even if the images is going to be used with SCCM. So let’s get started with Automated Master Image Creation.

Open CustomSettings.ini for your Build Deployment share and add the following to the top:

And at the bottom you add a section for each and every OS type you want to automate with the correct MAC Address:

If you’re using Windows 2008 R2 or Windows 7 you should add the ProductKey= as well to skip the licensing screen.

Automated Master Image Creation-03

To be able to move a captured image to the correct location in a Task Sequence you need to create a script in the scripts catalog, in my case \\mdt-01.ctxlab.local\MDTBuildLab$\Scripts.

Call the script Realocate.cmd and add the following:

And then add a Command Line task at the end with this command:

Automated Master Image Creation-04

So in the example above, if a computer with the MAC Address 00:15:5D:01:FB:32 boots on the ISO it will automatically start the Task Sequence W81, capture the image, move it to the Production Deployment Share and shutdown the computer.

All this without lifting a finger, a real zero touch deployment. Relax and check the Automated Master Image Creation status now and then from you mobile device.

Automated Master Image Creation-05

Wouldn’t it be cool if we could leverage PowerShell to automatically build the master images as a Schedule Task? The following script will create and start a Hyper-V VM with the correct MAC Address and delete it when the capture is finished.

To further improve the building time of the reference images, the captured images should be copied back to the MDT Build Deployment Share once in a while. This way you will update the latest version instead of the base Microsoft ISO image with hundreds of Windows Updates.

So how long does it take to deploy Citrix XenDesktop 7.1 totally automated which Gunnar Berger referred to above? 28 minutes from start to finish, including GPMC and the SCVMM Console.

To further reduce time and space take a look at this article from fellow CTP Aaron Parker : Cleaning up and Reducing the Size of your Master Image.

To learn more check my free training on Automated Master Image Creation.


Automation Framework Community Edition

The fastest way to build your lab environment.

Virtual Expo

Friday 30th of September 2022

Leave a Comment