How to get the Time Zone Display names with PowerShell

by Klaus Graefensteiner 6. April 2010 07:27

Here is a quick PowerShell Trick. Notice the list of all Time Zone names in the Time Zone settings control of Windows 7?

TimeZone Display Names

Figure 1: Time zone names in the Windows 7 time settings dialog

How can I get this list programmatically with PowerShell?

Here is the answer:

$TimeZones = [TimeZoneInfo]::GetSystemTimeZones();
$TimeZones | Select-Object -Property "BaseUtcOffset", "StandardName", "DaylightName"

Tags: , ,

PowerShell | Tips & Tricks

Comments are closed

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.

Administration

About

Powered by:
BlogEngine.Net
Version: 1.6.1.0

License:
Creative Commons License

Copyright:
© Copyright 2012, Klaus Graefensteiner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2012 by Klaus Graefensteiner

Rendertime:
Page rendered at 2/5/2012 11:02:03 PM (PST Pacific Standard Time UTC DST -7)