Using Microsoft Deployment Toolkit (MDT) to automate the creation of your company images can ensure a clean capture and save time in your deployments. In this guide, we will populate MDT and create our build and capture task sequence.

For years, using a thin image—preferably the default WIM of your OS—has been my favorite method of OS deployment. Custom images, especially those involving lots of manual changes, were generally untrusted due to potential corruptions. I’ve seen “golden images” with failed USB drivers, 1GB default user profiles, and broken application installations. I’m sure you can tell me your own horror stories.

Build and capture in MDT gives you a thin clean image with the customization that your environment needs. You can completely automate all of this by using a task sequence.

Our environment will consist of a domain-joined machine running Windows Server 2012 R2. The machine will have the latest version of MDT and ADK installed. In a test environment, you can even use MDT 2013 Update 1 Preview. If you are using SCCM for OS deployment, you will want a separate machine to host the MDT build and capture task sequence. For those new to MDT, see Part 1 of this guide for setup instructions.

Along with your MDT server, you will also need another VM running your client OS. This is the machine that will boot into your build and capture task sequence and will eventually make your master image. With your two VMs and MDT/ADK installed, let’s jump right into the build and capture task sequence process.

Populating content for a build

First, you will need to import your installation media into the Operating Systems folder. For your installation media, use an ISO that Microsoft provides. It is a best practice to use a clean installation media with each capture. Mount it, specify to import an operating system, and specify the path to the mounted ISO.

Windows 8.1 Enterprise imported into MDT

Windows 8.1 Enterprise imported into MDT

You will likely want a few applications preloaded into your captured image. Keep these programs limited to those that are universal to your environment and those that do not require reinstallation for updates (or are able to handle updates through WSUS/SCCM).

Common examples include:

We will handle the .NET Framework 3.5 feature in a later part of our task sequence. For now, import any application that you need. If needed, Part 2 of this guide covers importing Office. You can silently install each Silverlight and Visual C++ application with the /Q command.

Creating and editing the build

In the Deployment Workbench, right-click Task Sequences and select New Task Sequence. Give your task sequence an ID and name. Set the template to Standard Client Task Sequence. Continue through the wizard.

Edit the newly created task sequence and navigate to the State Restore phase. Select Windows Update (Post-Application Installation) and enable it.

Enabling the Windows Update (Post-Application Installation task)

Enabling the Windows Update (Post-Application Installation task)

Select the Install Applications task and change the property to Install a Single Application. Select an application that this captured WIM should include. If you have more than one application, add a new Install Application task and repeat the process above.

Above the Install Applications task, create a new task (Select Roles – Install Roles and Features). Finally, choose your OS and then select the .NET Framework 3.5 feature.

Adding .Net Framework 3.5 to a reference image.

Adding .NET Framework 3.5 to a reference image

Suspending a task sequence for manual changes

A task sequence, with its documented steps, prevents human error and automates the image creation process. Some steps may not be easily made into a step. If you have to manually change your image, you can still use MDT.

Create a Run Command Line task and enter cscript.exe “%SCRIPTROOT%\LTISuspend.wsf” at the command line. This will suspend the task sequence so that you can make manual changes. When ready, execute the Resume Task Sequence shortcut on the desktop. When creating the suspend task, consider when the change should take place. For example, the change may rely on a Windows update to be installed first. In this case, you would place the suspend task after the Windows Update (Post-Application Installation) task.

The Run Command Line task that calls LTISuspend.wsf

The Run Command Line task that calls LTISuspend.wsf

The task sequence is ready, but we still have a few more steps before the image can be captured. In our next post, we will explore CustomSettings.ini and Bootstrap.ini.

0 Comments

Leave a reply

Your email address will not be published.

*

© 4sysops 2006 - 2023

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