MDT is very flexible in the ability to define and use variables inline and in different locations. However, this also means that if you forget to assign a variable a value it may lead to unintended consequences that you might not easily discover. There are many different places in which you could find references to a variable:
In order to help manage all of these variables, the following PowerShell script scours a given deployment share
and returns the results of all references from scripts, task sequences and ZTIGather of variables in that deployment share. It saves it to a Variables.XML with a built in XSL transform in the working directory:
You can also specify a parameter to update a given INI to see any variables missing from the properties section.
To use it – download the attached Powershell and XSL and point to the same folder.
This post was contributed by Aly Shivji, an Architect with the Datacenter & Private Cloud Center of Excellence in Microsoft Services
Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use