I sometimes see a question on social.technet, which gets me thinking, this could be good material for a blog.
So was this, a question about which specified values take precedence over each other.
As some of you might know, MDT works with, and can be provided with certain values that are needed as input for an Operating System Deployment.
Normally certain values can be and will be provided during deployment. For example, when the MDT wizard pages are displayed, to ask for a specific information, like “Computer Details”, where the OSDComputerName of the machine can be injected.
figure 1.1: Deployment Wizard – Computer Details
This information can also be specified elsewhere, specified in three different ways:
- Task Sequence Variable
The question however is, which setting takes precedence over which setting? Only one way to find out 🙂
So I have set-up my MDT environment like this:
figure 1.2: Deployment Share Properties – Rules
As we can see here, the Wizard pane “SkipComputerName” is set to NO, which means it should show the computer details wizard. The value underneath “OSDComputerName” already reveals, that if this value is specified in the customsettings.ini this value will be used as the designated name for this particular machine.
However, we can also specify the OSDComputerName property somewhere else, and what happens if it is specified twice or triple?
Therefore I have created the following step in my deployment task sequence:
figure 1.3: Task Sequence Variables
a Task Sequence variable which holds the following information: Task Sequence Variable (Name) and (Task Sequence Variable) Value. As we can see the value is: “OSBUILD-TSVAR” while in my CustomSettings.ini the value for OSDComputername is OSBUILD-CSINI.
Now when I start a deployment I can see the following in my logfile (which can be perfectly read with trace64.exe or trace32.exe (depending on the version of the operating system architecture):
figure 1.4: BDD.log
In the logfile we see, that at first the value which resides in the CustomSettings.ini is used while a little bit after, the task sequence variable value specified in the task sequence is being used.
Lastly there is the Unattended.xml a file we haven’t discussed before, but I think along the way we all know the answer, since it’s already hidden (or visible 😉 ) in the logfile:
figure 1.5: BDD.log
Because when we look in the logfile of a running or completed deployment we will find values like the following everywhere: “Updated C:\MININT\Unattend.xml with BitsPerPel=32 (value was 32)” which means, that any value specified in either CustomSettings.ini or Task Sequence Variable, or settings stored in a database, will take precedence over a specified value in the Unattended.xml. So that right after the deployment has started, the gather step will run, and will collect information from all available ‘sources’, CustomSettings.ini, Task Sequence Variable or the default Unattended.xml which resides in your “DeploymentShare\Control\TaskSequenceID” folder:
figure 1.6: Running Lite Touch Installation
So in talking terms of priority:
- Unattended.xml goes above nothing
- CustomSettings.ini goes above Unattended.xml
- Database goes above CustomSettings.ini and Unattended.xml
- Task Sequence Variable, goes above Database, CustomSettings.ini and Unattended.xml
And then there’s also the possibility to influence values in the CustomSettings.ini with the “Priority” parameter, which I will discuss in a later blog.
I hope this can be an eye opener for everyone who is working with these three types of files and configuration settings, and hopefully it will enable you to create a flexible and transparent way to deploy your operating system to multiple computers, hardware, different types of machine. As long as you remember, the greatest common divisor (or denominator) of a setting, should always be provided, on an area where it’s impact is the smallest.
Meaning, that it has no use to modify the OSDComputerName variable each time when doing a new computer deployment. If you are going to deploy 1000 machines, leave the field empty. If you need to specify a workgroup for a particular task sequence or type of deployment, specify it in the customsettings.ini (or in the task sequence itself) whatever suits you best.
I think a nice goal to strive to, is to adjust both your task sequence and/or customsettings.ini as little as possible or as necessary.
Thanks for reading and keep on automating my padawan learners 😀