Question

How can I set TimeZone using Powershell, on a Windows Server 2008 R2 target machine?

Was it helpful?

Solution

This is how I do it in setup scripts...although our AD infrastructure would set this when the machine joins the domain anyway...I like to be thorough in my scripting :)

%windir%\system32\tzutil /s "Eastern Standard Time"

OTHER TIPS

At least in newer versions of Powershell (5.1 and later), there is a cmdlet. See the docs.

Set-TimeZone "Eastern Standard Time"

Older versions can find the script here.

I don't have Windows at hand to test, but here's the post that suggests a solution:

Note that they mention tzutil.exe is available in Windows 7 - might be available in WS 2008 R2?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top