TimeZone Manipulation in PowerShell

The easiest way to do time zone manipulation in PowerShell is to use the dot Net routines.

To list the available time zones.

[system.timezoneinfo]::getsystemtimezones() | out-gridview

To retrieve time zone info

[System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time")

To convert a time from one time zone to another, first convert it to UTC

$UTC = [System.TimeZoneInfo]::ConvertTimeToUtc($DateTime, $FromTZ)

Then convert it to whatever time zone you want

[System.TimeZoneInfo]::ConvertTimeFromUtc($utc, $ToTZ)

Convert time to filetime


Convert filetime to date/time