W2KSG: Time Zones

The WMI section of the scripting guide gives a very simple method of determining the time zone on your machine

Listing 6.20

Get-WmiObject Win32_TimeZone | Format-List

Bias      : 0
SettingID :
Caption   : (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London

Bias returns the offset from GMT and the caption returns the time zone.  Information on daylight saving settings is also available – try get-member on it!

 


Share this post :

 

Technorati Tags: ,

About these ads
This entry was posted in PowerShell and WMI. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s