Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-04-05
4
Medium Priority
?
322 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

824 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