strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\\"&strComputer&"\root\cimv2")
SetcolListOfServices=objWMIService.ExecQuery_
("Select*fromWin32_ServiceWhereState='Paused'andStartMode='Auto'")
ForEachobjServiceincolListOfServices
objService.ResumeService()
Next
