you can use the <a href=”http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx”>PSEXEC</a> and the command line <b>w32tm /resync /rediscover</b>.
Hereafter an example of a VBScript that will read computer names from a text file and will launch the correct command by using the <i>PSEXEC </i>utility:
Dim ExecutionPath ‘ where the script is executed
Dim UserName ‘the username with administrator privilieges
Dim Password ‘ the user’s password
Dim MyCommand ‘ the command to be launched
UserName = “domain\administrator” ‘ changeme
Password = “MyPassword” ‘ changeme
MyCommand = “w32tm /resync /rediscover & exit”
ExecutionPath = Replace(Wscript.ScriptFullName,WScript.ScriptName,””)
i = 0
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = Wscript.CreateObject(“Wscript.Shell”)
Set objFile = objFSO.OpenTextFile(“computers.txt”, 1)
Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(i)
arrFileLines(i) = objFile.ReadLine
i = i + 1
For l = LBound(arrFileLines) to Ubound(arrFileLines)
objShell.Run “cmd /c ” & ExecutionPath & “\psexec ” & arrFileLines(l) & ” -u ” & UserName & ” -p ” & Password & ” ” & MyCommand,6,1
For the <i>PSEXEC </i>tool you may copy it in C:\WINDOWS\SYSTEM32 or save it in the same folder where the script is located.
P.S. The computers.txt must have computer one computer name on each line.
I hope this helps.
In addition to that you can use a group policy to force all the computers to set thier time to a domain server or internet time server. Under “Computer Configuration > Administrative Templates > System > Windows Time Service > Time Providers” setup the “Configure Windows NTP Client” option to your local time server. The only way to force computers to update when you make a change to the time server would be to manually tell the machines to update, but this will have the machines check it at the specified interval and update them selves. You should set your time server to auto update from an internet time server to ensure that it is correct to the time at all times.
You can also setup a login batch file which uses the dos NET TIME command to set the local time to any server you specify. The command to do this is: If you have a way to run commands remotly on machines (such as via the AT comand) you can have all the machines execute the NET TIME command below which would then sync the time.
<pre>NET TIME \\ServerName /SET /YES</pre>