Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If I wanted to lauch the "net time 1

Status
Not open for further replies.

arlems

IS-IT--Management
Jul 31, 2003
84
US
If I wanted to lauch the "net time \\server /set /yet" as a script from an Active Directory, what would be the code for it? I know how to add network shares or printer, but not to sync the time of the client with the server. Thanks
 
One of these should work. I'm not sure on what permissions the user needs for these commands to function, they may need to be an administrator

Set WshShell = WScript.CreateObject("WScript.Shell")
wshshell.run("net time \\server /set /yet"),1,true
--or--
Set WshShell = WScript.CreateObject("WScript.Shell")
wshshell.run("net time /setsntp:server"),1,true

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top