Solved

Set Time from the server for a LIST of workstations on a domain

Posted on 2009-04-05
4
312 Views
Last Modified: 2012-05-06
Hi All,

Can someone assist me with a script that i can run as administrator from a server that will use a text file with computer names in it to set the time please using the net time /domain:acme /set command?

If there is an easier or better way to mass change time for workstations let me know.

This is urgent for me, if you can help please do.

Thanks

Aalborg
0
Comment
Question by:AI-SYD
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
cubeeq earned 500 total points
ID: 24073573
Use psexec from pstools (google it). The syntax is as follows: psexec \\computer1,computer2,... command /argument1 /argument2. To enumerate all computers in domain use \\* instead of the name of computer. And your command should be something like psexec \\* net time /domain:<your domain> /set. It will sync your workstations by the domain controller of your domain.
0
 

Author Comment

by:AI-SYD
ID: 24073709
HI Mate,

Im getting an error when running this from a DC as Domain Administrator, any idea? I am researching also while i wait.

Thanks

Aalborg
E:\IT\Ultilities\PsTools>psexec \\computer net time /domain:ACME /set
 
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
 
 
System error 5 has occurred.
 
Access is denied.
 
net exited on computer with error code 2.
 
E:\IT\Ultilities\PsTools>

Open in new window

0
 

Author Comment

by:AI-SYD
ID: 24073715
Got it.

psexec -s  \\* net time /domain:ACME /set /Y
0
 

Author Closing Comment

by:AI-SYD
ID: 31566846
psexec -s \\* net time /domain:ACME /set /Y
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

840 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