Solved

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

Posted on 2009-04-05
4
313 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

740 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