PowerTip: Find Time Zone Names with PowerShell

The Scripting Guys

Dr Scripto

Summary: Find time zone enumeration names with Windows PowerShell.

Hey, Scripting Guy! Question How can I use Windows PowerShell to enumerate the names of time zones that are configured on my computer?

Hey, Scripting Guy! Answer Use the System.TimeZoneInfo .NET Framework class, and use the GetSystemTimeZones static method
           to obtain the list. You want the ID property for enumeration values and the DisplayName property to see
           the standard display name values. Here is an example:

[timezoneinfo]::GetSystemTimeZones() | select displayname, id

The Scripting Guys
Dr Scripto

Follow Dr Scripto   

No Comments.