strComputer ="." Set objWMIService =GetObject("winmgmts:" _ &"{impersonationLevel=impersonate,(Shutdown)}!/"& strComputer &" ootcimv2") Set colOperatingSystems = objWMIService.ExecQuery _ ("Select * from Win32_OperatingSystem") ForEach objOperatingSystem in colOperatingSystems ObjOperatingSystem.Reboot() Next