How to Change the TimeZone by Using PowerShell

Azure VM sets it’s time zone as UTC by default. Sometimes, the settings might also grey out, so you cannot modify it from the GUI.

So, it follows the time always until you set a different time zone. I am doing the settings in the following way:. I hope this will help you too.
The steps are executed in PowerShell Commands

  • Open windows PowerShell as administrator in the VM
  • Type the command so that you get the current time zone settings in the VM : Get-TimeZone
    I am expecting the following result:
187559-image.png
  • Now you need to find the id of your time zone using the command. Note that, you must change the string used as per your location. For Example: Get-TimeZone -ListAvailable | where ({$_.Id -like "Mountain*"})
  • Copy the id shown corresponding to your location and set the new time zone by the command. Here again, change the string id as per your location: Set-TimeZone -Id "Mountain Standard Time"

  • This should immediately change the time to the correct time in the location.

Ref: https://learn.microsoft.com/en-us/answers/questions/790452/azure-vm-displaying-incorrect-time