Dim objOS As Object For Each objOS In GetObject("winmgmts:{(Shutdown)}").InstancesOf("Win32_OperatingSystem") objOS.Win32Shutdown(5) Next