Changing the Time Zone in Windows Server in the Azure cloud cannot be made with the normal process.
As you can see on the image below whenever you change the Time zone on the Date & time panel nothing will happen.
There was a need to change it because all the log files were showing UTC time and it was a bit confusing for the Team. Therefore, I searched for a solution and I have found that by using PowerShell the issue can be fixed.
The process is simple.
- Open PowerShell with Administrator rights.
- You need to use the ID of the time zone to change it. So, you can list the available Time zones using the following command:
Get-TimeZone -ListAvailable
That will list all possible filters. There are a lot. And they all look like this:
Id : Romance Standard Time
DisplayName : (UTC+01:00) Brussels, Copenhagen, Madrid, Paris
StandardName : Romance Standard Time
DaylightName : Romance Daylight Time
BaseUtcOffset : 01:00:00
SupportsDaylightSavingTime : True
You can filter the list if you know the Id or you can search for a city by adding the where clause like:
Get-TimeZone -ListAvailable | where ({$_.DisplayName -like "*Brussels*"})
or
Get-TimeZone -ListAvailable | where ({$_.Id -like "Romance*"})
- As a last step, you can use the Id to set the time zone of your choice:
Set-TimeZone -Id "Romance Standard Time"
And that’s all.
Cheers,
One thought to “Changing the Time Zone of Azure Virtual Machines with Windows Server OS”
As someone who is not affiliated wit this company in any way. This solution resolved an issue I had with a Server running a time sensitive software data collection. Thank you!!!