Logoff
Option Explicit Dim oSystem, oSystems Set oSystems = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true") For Each oSystem In oSystems oSystem.Win32Shutdown 4 Next