function ConvertTo-WindowsTimeZone {
    Takes an IANA time zone and converts it to a Windows time zone.
    IANA time zones are returned by most web endpoints. We can translate any
    given IANA time zone (e.g. America/New_York) into a proper Windows time zone
    (e.g. Eastern Standard Time).
    This function leverages the windowsZones.xml file to translate
    IANA to Windows time zones.
    ConvertTo-WindowsTimeZone 'America/New_York'
    Returns the Windows time zone 'Eastern Standard Time'
    Returns the Windows time zone based on the public IP address.
    IANA time zone string.

  param (
    [string]$IANATimeZone = (Get-IANATimeZone)
  try {
    $url = ""
    [xml]$xml = (Invoke-WebRequest -Uri $url -ContentType 'application/xml').Content
    $zones = $xml.supplementalData.windowsZones.mapTimezones.mapZone | Where-Object territory -Match 001
  catch {
    throw "Failed to obtain time zone XML map from GitHub: $_"

  $win_tz = ($zones | Where-Object type -Match $IANATimeZone).other

  Write-Verbose "IANA Time Zone ($IANATimeZone) = Windows Time Zone ($win_tz)"

  return $win_tz