As an IT administrator, you may be required to set the correct time zone across multiple servers located in different regions. This is a common requirement. You can easily achieve this using PowerShell.
In this tutorial, I will explain how to set the time zone using PowerShell in Windows.
In PowerShell, you can use the Set-TimeZone cmdlet to set the time zone on Windows systems.
Set the Time Zone Using PowerShell
Follow these steps to set the time zone using PowerShell:
- Open PowerShell with administrative privileges (You must).
- To view the current time zone setting, run the following command:
Get-TimeZoneThis command will display the current time zone information.
As shown in the screenshot below, the time zone of my system is displayed after executing the above PowerShell command.

- To list all available time zones, use the following command:
Get-TimeZone -ListAvailableThis command will display a list of all supported time zones.

- To set the desired time zone, use the
Set-TimeZonecmdlet followed by the time zone ID. For example, to set the time zone to “Pacific Standard Time” (commonly used in states like California, Washington, and Oregon), run:
Set-TimeZone -Id "Pacific Standard Time"Replace “Pacific Standard Time” with the appropriate time zone ID for your location, such as “Eastern Standard Time” for states like New York, Florida, and Massachusetts, or “Central Standard Time” for states like Texas, Illinois, and Minnesota.
- Verify that the time zone has been set correctly by running
Get-TimeZoneagain.
Check out Update PowerShell on Windows 11
Examples of Setting Time Zones for Different U.S. Regions
Here are a few examples of setting time zones for different regions in the United States:
- Setting the time zone for Los Angeles, California:
Set-TimeZone -Id "Pacific Standard Time"- Setting the time zone for New York City, New York:
Set-TimeZone -Id "Eastern Standard Time"- Setting the time zone for Chicago, Illinois:
Set-TimeZone -Id "Central Standard Time"- Setting the time zone for Denver, Colorado:
Set-TimeZone -Id "Mountain Standard Time"Read List Windows Features Using PowerShell
Automating Time Zone Settings Across Multiple Servers
If you need to set the time zone on multiple servers, you can use PowerShell remoting or create a script to automate the process. Here’s an example of how to set the time zone on remote servers:
$servers = "server1", "server2", "server3"
$timezone = "Pacific Standard Time"
Invoke-Command -ComputerName $servers -ScriptBlock {
Set-TimeZone -Id $using:timezone
}In this example, the $servers variable contains the names of the remote servers, and the $timezone variable holds the desired time zone ID. The Invoke-Command cmdlet executes the Set-TimeZone command on each remote server specified in $servers.
Troubleshooting Time Zone Issues
Below are the issues I faced while doing this, so I thought to share them with you.
If you encounter any issues while setting the time zone using PowerShell, consider the following troubleshooting tips:
- Ensure that you have administrative privileges to run the
Set-TimeZonecmdlet. - Double-check the time zone ID for accuracy. You can refer to the list of available time zones by running
Get-TimeZone -ListAvailable. - If you receive an error message indicating that the time zone ID is not valid, verify that the time zone is supported on your version of Windows. You can check the Microsoft documentation for the list of supported time zones.
- If the time zone setting does not take effect immediately, you may need to restart the system or the specific services that depend on the time zone setting.
Conclusion
In this tutorial, I have explained how to set the time zone in Windows using the Set-TimeZone cmdlet in PowerShell.
If you found this tutorial helpful, please share it with your colleagues and friends who might benefit from learning how to set the time zone using PowerShell in Windows.
You may also like:
- Windows PowerShell vs CMD
- Check for Windows Updates Using PowerShell
- Install Windows Updates Using PowerShell
Bijay Kumar is an esteemed author and the mind behind PowerShellFAQs.com, where he shares his extensive knowledge and expertise in PowerShell, with a particular focus on SharePoint projects. Recognized for his contributions to the tech community, Bijay has been honored with the prestigious Microsoft MVP award. With over 15 years of experience in the software industry, he has a rich professional background, having worked with industry giants such as HP and TCS. His insights and guidance have made him a respected figure in the world of software development and administration. Read more.