Set-TimeZone function (PowerShell)

Set the system time zone with a simple function.

3.9 Star
4,211 times
Add to favorites
Operating System
E-mail Twitter Digg Facebook
  • ValidateSet
    1 Posts | Last post February 17, 2014
    • Hey Ben,
      Great script!  You could make it a little easier to use by adding validateset to restrict, and add tab completion, the timezon parameter.  I did it for my computer using the valid timezone list off of msdn:
      I'd post the whole list here but it passes the allowed character list.  you can view the data at pastebin:
  • Thanks
    1 Posts | Last post October 09, 2012
    • This was a really helpful script. I've used it a few times for time zone settings in my environment.
  • Remote Execution
    1 Posts | Last post May 16, 2012
    • Is there a way to use this function to change the time zone on a group of remote servers?
  • MDT / User permissions
    2 Posts | Last post September 13, 2011
    • My company has a large remote event and I could use this script to update the timezones for everyone that attends the event.  Last year, we had to hack at the registry permissions via GPO so that users could change the timezones themselves, since they don't have admin rights.  This will make it easier since we could attach it with GPP and use item-level targeting to target the subnets at the event and then reverse the process when the event is over.
      On a side note, doesn't MDT have a built-in way to set the timezone?
    • Blog post on MDT and timezones: