Earlier this week I got a question on how to have a single MDT Lite Touch task sequence support a dynamic selection of OS Image.
Now, typically I recommend having a 1:1 relationship between task sequence and OS Image, but you can certainly have MDT dynamically pick an OS Image based on a variable you define in CustomSettings.ini. It just requires a little trick 🙂
In this scenario I'm setting a custom variable named CustomImageVariable to dynamically select an OS Image.
This means I have multiple Install Operating System actions in my task sequence, each of them with a condition. For example CustomImageVariable=1607 (see below).
If you only do the above configuration, MDT will select the first OS Image that is configured with the task sequence. This is done even before the Install Operating System is run, so to force MDT use the image you want, you need to clear the OSGUID variable before the various Install Operating System actions. Here is how:
Finally you need to have your CustomSettings.ini file dynamically set the CustomImageVariable variable. Here is an example with CustomSettings.ini being configured to set it differently depending on default gateway (network).
[Settings] Priority=DefaultGateWay, Default Properties=CustomImageVariable [DefaultGateWay] 192.168.10.1=Oslo 192.168.20.1=Stockholm [Oslo] CustomImageVariable=1607 [Stockholm] CustomImageVariable=1703 [Default] OSInstall=YES
Written by Johan Arwidmark