Simple VBScript to restart all VMware services

strComputer = “.” Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\”&strComputer&”\root\cimv2”) Set colListOfServices = objWMIService.ExecQuery(“Select * from win32_Service where Name Like ‘VM%’”) IntSleep = 15000 For Each objService in colListOfServices If UCase(Left(objService.name, 1)) > “N” then objService.StopService() WScript.Sleep intSleep objService.StartService() strMsg = strMsg & vbCr & objService.name & ” Restarted.” End If Next Wscript.Echo strMsg Sure you can tweak […]

Rate this:

Read More Simple VBScript to restart all VMware services