If you need to configure a Server Core or simply because you want to configure with PowerShell. In this post, I show you how to set the system time zone using the Set-TimeZone cmdlet.
To set the system time zone with PowerShell, use the Set-TimeZone cmdlet with the following syntax:
1 2 3 4 5 6 | Set-TimeZone -Name <String> Set-TimeZone -Id <String> |
-Name and -Id Parameters
If you want to obtain all valid timezone IDs and display names. you should use the tzutil.exe tool.
With the /l parameter lists all valid time zone IDs and display names.
1 2 3 | tzutil.exe /l |
with the Get-TimeZone cmdlet, we can verify the work done.
If you want to know more about Set-TimeZone cmdlet, check out this link: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-timezone?view=powershell-6