Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
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 strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

930 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

9 Experts available now in Live!

Get 1:1 Help Now