Solved

Set the Time zone with a script or GPO

Posted on 2009-07-14
2
705 Views
Last Modified: 2013-11-09
Set the Time zone with a script or GPO

I have many computers in the domain that don't have clock settings the same some of them are one hour difference because of the time zone which is set up different.
I need a script or if there is a GPO that can set all computers to the correct time and same time zone.

Thanks
0
Comment
Question by:jskfan
2 Comments
 
LVL 5

Accepted Solution

by:
Ubertam earned 500 total points
ID: 24849969
http://support.microsoft.com/kb/914387/

Gives all the details, including script examples.
0
 

Author Comment

by:jskfan
ID: 24864408

This script works just perfect it retrieves the clock time, but for only one computer how do I modify it to retrieve the time of many computers, if you can tweek it to show the zone will be more than perfect.


strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_OperatingSystem")
 
For Each objItem in colItems
    strTime = objItem.LocalDateTime
    dtmTime = CDate(Mid (strTime, 9, 2) & ":" & Mid(strTime, 11, 2) & ":" & _
        Mid(strTime, 13, 2))
    dtmTime = CDate(dtmTime)
    Wscript.Echo FormatDateTime(dtmTime, vbFormatLongTime)
Next
0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now