Hello Everyone! My name is Sanjoy Saha and I am a Technical Advisor at Microsoft. Today I am going to talk about some of the important XMLs in Microsoft Deployment Toolkit. It is pertinent to understand what goes on in the background and how the Deployment Workbench MMC populates information from the Deployment Share. This would also help in some advanced troubleshooting but I would caution you to always backup the XML before you make any modifications as it may break more things than it fixes. Having said that, I would always encourage you to try things out in your test DeploymentShare :).
ZTIGather.xml
This is perhaps one of the most important XML files in the DeploymentShare. This is located in the Scripts folder under your Deployment Share. If you open it up, you would see a lot of variables defined that ZTIGather.wsf uses during the Gather process. This is where all your Task Sequence variables and Wizard Control variables are defined. Each variable is defined as a property and includes a very handy description. If I have to look up a variable for use in my Task Sequence or CustomSettings.ini I use this XML file to locate it.
Here is a small snippet:
<property id="DeploymentType" type="string" overwrite="true" description="The type of deployment (NEWCOMPUTER, REFRESH, REPLACE) being performed" />
<property id="Phase" type="string" overwrite="true" description="The current phase of the deployment (NEWCOMPUTER, STATECAPTURE, PREINSTALL, INSTALL, POSTINSTALL, STATERESTORE)" />
ZTIConfigure.xml
This is also located in the Scripts folder and is used by the ZTIConfigure.wsf. To give you a bit of background, ZTIConfigure.wsf updates information in your Unattend.xml based on all the values that have been specified during the Deployment Process like in CustomSettings.ini. This runs in the “Preinstall” phase under the “Configure” step.
This script reads the ZTIConfigure.xml file to determine how to update the Unattend.xml, Sysprep.inf, or Unattend.txt file with the appropriate values specified in the deployment properties. The ZTIConfigure.xml file contains the information to translate properties to settings in the Unattend.xml, Sysprep.inf, or Unattend.txt file.
Here is an example:
<mapping id="DomainAdmin" type="xml">
<xpath><![CDATA[//settings[@pass="specialize"]/component[@name="Microsoft-Windows-UnattendedJoin"]/Identification/Credentials/Username]]></xpath>
</mapping>
Here as we can see the DomainAdmin variable is mapped to the component “Microsoft-Windows-UnattendJoin” in the specialize phase. The values are updated in the Unattend.xml as per these mappings.
Ts.xml
This is the actual Task Sequence file containing all the groups, steps and actions that you have defined in your Task Sequence. The information in the Workbench is populated based on the settings defined here. There would be an instance of this file for every Task Sequence and is located under the <Task_Sequence_ID> folder in your Control directory. This file can prove especially useful if you want to implement one of your colleagues TS in your deployment share. You can simply create a similar dummy TS and replace your ts.xml with your colleague’s ts.xml.
Unattend.xml
This is the answer file for your Task Sequence that MDT uses during Deployment. I would always encourage to modify the Unattend.xml using the “Edit Unattend.xml” button in the “OS Info” tab of each Task Sequence’s properties. This opens up the Unattend.xml in Windows System Image Manager and reduces chances of errors. This XML is present in the <Task_Sequence_ID> folder under the “Control” folder.
TaskSequences.xml
This XML keeps track of all the Task Sequences in your Deployment Share and if you have grouped them under folders then they appear as a member of a group under the TaskSequenceGroups.xml.
I have created a group called Group1 under “Task Sequences”. This holds a single Standard Client Task Sequence with ID – “WIN7TEST”.
This would appear in the TaskSequenceGroups.xml as:
<group guid="{bc6e5095-c023-4745-b5f0-fca52d300245}" enable="True"><Name>Group1</Name><Comments>This is a Test TS group</Comments><CreatedTime>8/21/2015 1:00:11 PM</CreatedTime><CreatedBy>CONTOSO\Administrator</CreatedBy><LastModifiedTime>8/21/2015 1:00:23 PM</LastModifiedTime><LastModifiedBy>EGG\Administrator</LastModifiedBy><Member>{4939c93e-5deb-419e-9182-c4ee95ffe42d}</Member></group>
Here the group name is Group1 as the folder under Task Sequences and you would see a member with the GUID - {4939c93e-5deb-419e-9182-c4ee95ffe42d}. This is the Task Sequence WIN7TEST as you can figure out from the TaskSequences.xml.
<ts guid="{4939c93e-5deb-419e-9182-c4ee95ffe42d}" enable="True"><Name>win7test</Name><CreatedTime>7/11/2015 9:21:38 PM</CreatedTime><CreatedBy>CONTOSO\Administrator</CreatedBy><LastModifiedTime>7/11/2015 9:21:38 PM</LastModifiedTime><LastModifiedBy>CONTOSO\Administrator</LastModifiedBy><ID>WIN7TEST</ID><Version>1.0</Version><TaskSequenceTemplate>Client.xml</TaskSequenceTemplate></ts>
Similarly you have several other XML files which hold information based on their nomenclature like OperatingSystems.xml, OpeartingSystemGroups.xml, Packages.xml, PackageGroups.xml, SelectionProfiles.xml, SelectionProfileGroups.xml, Drivers.xml, DriverGroups.xml, Applications.xml, ApplicationGroups.xml, LinkedDeploymentShares.xml and LinkedDeploymentShareGroups.xml. All these XMLs reside in the Control folder and store information as their name suggests. Like the OperatingSystems.xml has the information of all the Operating Systems imported through the Deployment Workbench, Applications.xml store information about the applications and so on. All these XMLs follow pretty much the same structure as the example I mentioned above.
Please note that this is not a comprehensive list of the XMLs that MDT uses but are some of the important ones that can help you in your troubleshooting.
So all these are good and dandy but do we really need to know this stuff? Well in most of the cases you would not but there would be scenarios where knowledge about these XMLs can get you out of tricky situations (and a little knowledge never hurt anybody :) ). Here is an example:
If you observe the above snippet carefully, you would notice that “Task Sequences” isn’t visible in the Deployment Workbench. I modified one of the tags in the TaskSequences.xml file and the Deployment Workbench cannot resolve the tags in that XML because of which the “Task Sequences” folder isn’t visible in the Workbench. Here’s what I did:
<ts guid="{8b64951a-c156-470a-a090-175e16d33c79}" enable="True"><Name>tst2</Name><CreatedTime>8/20/2015 6:44:43 PM</CreatedTime><CreatedBy>EGG\Administrator</CreatedBy><LastModifiedTime>8/20/2015 6:44:43 PM</LastModifiedTime><LastModifiedBy>EGG\Administrator</LastModifiedBy><ID>TST2<ID><Version>1.0</Version><TaskSequenceTemplate>Custom.xml</TaskSequenceTemplate></ts>
If you notice carefully there is no end tag for <ID>. Instead of <ID>TST2<ID>, it should have been <ID>TST2</ID>. This can happen to any of the XMLs. XMLs are pretty easy to modify and can become corrupt because of human errors or from scanning tools like A/V. So now you know where to look if any of the folders are missing in the Deployment Workbench.
Well that’s it for now! Hopefully this post was helpful and do let me know what you think of it.