I’ve been on an engagement where I needed to leverage an MDT Integrated SCCM Task Sequence. The Microsoft Deployment Toolkit is still one of the best tools for customizing your image deployment. Dynamically naming computers, PreSeeding your UDI wizard with apps, and tackling USMT can all be done and done well with MDT. Today, I’d like to talk a bit about the CustomSettings.ini file and how we use it to automate plenty of menial tasks when imaging a machine.
Have a naming standard for your desktops and laptops? You can dynamically name your devices as they are imaged with a simple one liner in CustomSettings.ini:
OSDComputername=Device-#Right(“%SerialNumber%”,8)#
The above command will set each of your imaged devices to a standard name of Device- followed by the right 8 values/characters of the computers Serial Number. MDT’s ZTIGather script is a wonderful way to harvest useful information from the system you plan on imaging. Variables like SerialNumber, Model, Gateway, etc… give you dynamic points to make decisions on what values to pass through your Task Sequence Variables.
Do you have a long list of apps in your mdt wizard? Are you tired of clicking 5, 10, 15 apps each time you use UDI? In your customsettings.ini, you can prepopulate the checks in the MDT wizard for specific apps!
Applications001={MyAppGuidGoesHere}
Having this line will make the corresponding application’s box in the mdt wizard to be checked. If you know every single machine you image will require a specific application and you do not want to capture it in your base image, try using the MandatoryApplications property.
MandatoryApplications001={MyAppGuidGoesHere}
This will require this application be installed regardless of user/technician input.
This may seem like just saving a few seconds, but if you leverage Routines/Sub Routines in your CustomSettings.ini you can really make the imaging technician’s life easier.
For Example:
You have two sites in your environment: Saint Louis and Chicago. Saint Louis potentialy requires apps (1,2,3) while Chicago potentially requires apps (1,3,5)). Figure out the Gateways that each site images from and use something like this:
[Settings]
Priority=DefaultGateway, Default
[DefaultGateway]
10.0.0.1=STL
10.1.0.1=CHC
[STL]
Applications001={MyApp1GuidGoesHere}
Applications002={MyApp2GuidGoesHere}
Applications003={MyApp3GuidGoesHere}
[CHC]
Applications001={MyApp1GuidGoesHere}
Applications002={MyApp3GuidGoesHere}
Applications003={MyApp5GuidGoesHere}
[Default]
OSDComputername=Device-#Right(“%SerialNumber%”,8)#
Finally, I’d like to talk about USMT. I’ve used USMT for OS migrations several times and its a great tool. One of the least frequently used options is utilizing USMT with hardlinks. USMT on the local disk is as easy as a few lines in your CS.ini!
SkipUserData=YES
UserDataLocation=AUTO
SkipComputerBackup=YES
ComputerBackupLocation=AUTO
USMTMigFiles001=MigApp.xml
USMTFiles002=MigUser.xml
ScanStateArgs=/v:5 /o /c /ue:*\* /uel:90
LoadStateArgs=/v:5 /c /lac
Having 8 lines that enable you to move user data when refreshing their image is pretty slick. This is a very feasible route to move user data if you don’t want to leverage something like a state migration point in SCCM (network share) or removable media.
Any MDT questions or possible scenarios you’d like to see? Feel free to post your ideas/requests, because I always need inspiration for my next blog 🙂
Dp