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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.