Solved

Set the Time zone with a script or GPO

Posted on 2009-07-14
2
730 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

635 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