This is awesome. Been toying with this across a few evenings. I keep getting the wrong time zone after adding in a few timezones, e.g. eastern standard time. I think it is because of the -pattern logic so it is deciding to use eastern standard time (mexico) vs just Eastern Standard Time. Wondering if something like this will work (I'm going crosseyed as an irregular regular expression user trying to make sure I encapsulate and escape correctly so it evaluates the variable contents), or potentially defeat the purpose of your fix for names...
# export list of available timezones on this computer..
Get-TimeZone -listavailable | Export-CSV $env:temp\timeZones.csv
$TimeZones = $(select-string -Path $env:temp\timezones.csv -Pattern "^$SetTimezone$")
LogWrite "Timezones = $TimeZones"
Thanks so much!