Solved

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

Posted on 2009-04-05
4
308 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

19 Experts available now in Live!

Get 1:1 Help Now