Home > OS >  Powershell - Set-TimeZone
Powershell - Set-TimeZone

Time:04-04

I want to set the TimeZone to "automatic" via Powershell! Is this possible? Here is the doc: enter image description here

CodePudding user response:

I'm not familiar with a powershell cmdlet to set the TimeZone to automatic but I do know you can set it via Registry editing or GPO.

You can set via registry per below, please reference the following link for more informaiton: https://docs.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/cannot-set-timezone-automatically

Note: The standard be careful when messing with the registry disclaimer applies. You can seriously break your OS if you mess with the wrong things. Be careful!

$TZAutoSettingRegPath = "HKLM:\SYSTEM\CurrentControlSet\Services\tzautoupdate"
Set-ItemProperty -Path $TZAutoSettingRegPath -Name "Start" -Value 3
  • Related