The Deployment Guys

Helping to deploy your world automagically...

Setting MDT Time Zone Variables from the Source OS Time Zone

Setting MDT Time Zone Variables from the Source OS Time Zone

  • Comments 1
  • Likes
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:  http://blogs.technet.com/deploymentguys/archive/2010/02/15/using-convertbooleantostring-with-ztigather-wsf-in-mdt-2010.aspx.

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:

[Settings]
Priority=TimeZone, TestLegacyOS
Properties=TimeZoneStandardName, TimeZoneCaption, IsLegacyOS

[TimeZone]
UserExit=GetCurrentTimeZoneExit.vbs
TimeZoneStandardName=#GetCurrentTimeZoneWmiProperty("StandardName")#
TimeZoneCaption=#GetCurrentTimeZoneWmiProperty("Caption")#
TimeZoneName=#GetCurrentTimeZoneRegistryKeyName#
IsLegacyOS=#ConvertBooleanToString(%OSCurrentBuild% < 5200)#

[TestLegacyOS]
SubSection=IsLegacyOS-%IsLegacyOS%

[IsLegacyOS-True]
TimeZone=#GetCurrentTimeZoneLegacyIndex#

 

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.

Attachment: GetCurrentTimeZoneExit.zip
  • 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?

    iebishop@vcu.edu

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment