Book Image

Mastering the Microsoft Deployment Toolkit

By : Jeff Stokes, Manuel Singer
Book Image

Mastering the Microsoft Deployment Toolkit

By: Jeff Stokes, Manuel Singer

Overview of this book

Topic The Microsoft Deployment Toolkit (MDT) provides a comprehensive collection of tools, processes, and guidance for automating desktop and server deployments. It considerably reduces deployment time and standardizes desktop and server images. Moreover, MDT offers improved security and ongoing configuration management. Microsoft Deployment Toolkit is the official supported method of creating and customizing Windows images for deployment. Description: Starting from scratch, this book walks you through the MDT setup, task sequence creation, and image deployment steps in detail. Breaking down the various MDT concepts, this book will give you a thorough understanding of the deployment process. Beginning with imaging concepts and theory, you will go on to build a Microsoft Deployment Toolkit environment. You will understand the intricacies of customizing the default user profile in different versions of Windows. Driver handling can be a challenge for larger organizations; we’ll cover various driver concepts including mandatory driver profiles. ]Other important topics like the User State Migration Tool (USMT), configuration of XML files, and how to troubleshoot the USMT are also discussed in the book. We will cover the verifier and Windows Performance Toolkit for image validation scenarios. Furthermore, you will learn about MDT web frontend implementation as well as how to utilize the database capabilities of MDT for deeper deployment options. We’ll wrap it all up with some links to resources for more information, blogs to watch, and useful Twitter handles.
Table of Contents (18 chapters)
Mastering the Microsoft Deployment Toolkit
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface

UserExit script


With all the rules, conditions and WMI queries, MDT is already a very powerful tool. But sometimes you hit limitations during the gather process.

What if the vendor of your PC hardware has three different model names of the same hardware and you need a model mapping or model alias? Your serial number contains unneeded characters and needs to be truncated? Or in short, you need the ability to execute a custom VBS script.

MDT gives you this opportunity. It is a little bit misleading calling it UserExit script. You can define one (or more) scripts, which will then share its functions inside CustomSettings.ini.

Let's open an editor and create a file called MDTUserExit.vbs. Copy the following code mentioned inside this VBS.

A UserExit script always needs the main function with name UserExit():

Function UserExit(sType, sWhen, sDetail, bSkip)
  UserExit = Success
End Function

But this basic function does not provide any logging. So you never know if UserExit() was triggered...