I want to set the TimeZone to "automatic" via Powershell! Is this possible? Here is the doc:
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