To use different settings for Task Sequence “A” and “B” you could use a SQL database, but in some environments that’s not possible, so the only way is to use the MDT rules.
First of all we need to change the first step in the Task Sequences. By default the “Gather local only” step is processing local rules only. Change this to “Gather local data AND process rules”, and specify your rules file, typical customsettings.ini:
After this, open the customsettings.ini rules file, and add “TaskSequenceID” to the Priority list (on top of the file).
Priority=TaskSequenceID, Model, Default
On the bottom of the rules file, add two (or more) blocks. With the Task Sequence ID between brackets;
Next, backup the scripts\DeployWiz_SelectTS.vbs file, and open the original in a text-editor. Add the following lines:
After “Dim sTemplate”, add;
Set Oshell = createObject("Wscript.shell")
Before, “End Function” add;
sCmd = "wscript.exe """ & oUtility.ScriptDir & "\ZTIGather.wsf"""
oItem = oSHell.Run(sCmd, , true)
To summarize the adaptations in DeployWiz_SelectTS.vbs: