'Script Start
'Substitute server
strRemoteComputer = "servername"
'Substitute script name
strWorkerScript = "scripttorunonremote.vbs"
Set objWshController = WScript.CreateObject("WshController")
Set objRemoteScript = objWshController.CreateScript(strWorkerScript, strRemoteComputer)
objRemoteScript.Execute
Do While Not objRemoteScript.Status = 2
Wscript.Sleep(100)
Wscript.Echo "Remote script not yet complete."
Loop
'Script End
How to execute a VBScript
No comments:
Post a Comment