Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
Try creating an instance of the WScript.Shell object and using the Exec method to run the command line.
var commsServerName = "\\\\AMICOMMS01";
var cmdString = "net time "+commsServerName+" /set /y";
var ShellObj = Sys.OleObject("WScript.Shell")
ShellObj.Exec(cmdString)