Does anyone know how to query a server (win2000 and unix) to let me the current time the serverr thinks it is. I have a bunch of computers that are supposed to hit an NTP server and sync the time but it doesn't seem to be working on all. I need to query a bunch of servers to determine which ones have their time incorrect.
Thanks
-Joe
Checking time on remote server
Moderators: JRL, Dorian (MJT support)
Use the NET TIME command and pipe results to a text file?
Let>RP_WAIT=1
Run>NET TIME //computername >> c:\time.txt
//now read c:\time.txt ... etc
Let>RP_WAIT=1
Run>NET TIME //computername >> c:\time.txt
//now read c:\time.txt ... etc
MJT Net Support
[email protected]
[email protected]
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Cannot try this now, but have you tried NET?
I believe the syntax is something like:
NET TIME \\COMPUTERNAME
Once you have the correct syntax you could redirect the output to a text file, then parse the text file to extract the Time.
Then you can use IF and branch your script based on the results of the Time you extracted.
I believe the syntax is something like:
NET TIME \\COMPUTERNAME
Once you have the correct syntax you could redirect the output to a text file, then parse the text file to extract the Time.
Then you can use IF and branch your script based on the results of the Time you extracted.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Great minds not only think alike, they think alike at precisely the same time. Which is spooky given this question was about time itself!
MJT Net Support
[email protected]
[email protected]