Setting MDT Time Zone Variables from the Source OS Time Zone

15 Feb 2010 Update – To use technique found in this post with MDT 2010 you will need to use one of the workarounds described in this post:

System Center Configuration Manager 2007 Operating System Deployment has the ability to migrate the time zone from the source operating system to the destination operating system.  This is done by using the Migrate time zone option in the Capture Windows Settings step of the task sequence.

Unfortunately, MDT Lite Touch Deployment does not offer the same functionality.  So I created a User Exit script (GetCurrentTimeZoneExit.vbs) to query the source OS time zone and set the MDT time zone variable(s).  Using this script with the CustomSettings.ini entries below will always set TimeZoneName and on legacy operating systems (Windows XP/Windows Server 2003 and earlier) it will set TimeZone.  Also, the script can set two custom variables that query WMI for the time zone standard name (TimeZoneStandardName) and the Control Panel description of the time zone (TimeZoneCaption).

Copy GetCurrentTimeZoneExit.vbs to the MDT Scripts folder and add the following entries to CustomSettings.ini:

Priority=TimeZone, TestLegacyOS
Properties=TimeZoneStandardName, TimeZoneCaption, IsLegacyOS

IsLegacyOS=#ConvertBooleanToString(%OSCurrentBuild% < 5200)#




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.

This post was contributed by Michael Murgolo, a Senior Consultant with Microsoft Services - U.S. East Region.

Comments (1)

  1. Buddy Bishop says:

    My MDT id on a virtual server.  The boot media uses correct info for where the server is, but due to the way trhe computer center configures it, the DNS addresses are wrong for workstations booting off the boot media to find the server.

    I can manually fix this by adding a hosts file to the PE WIM and making my own medai from there.

    But, is there a way to account for this in the MDT tool so that the boot media it generates is going to have a custom hosts file OR maybe even static DNS entries and a DHCP Ip address?

Skip to main content