Неработает у меня этот скрипт:
--------------begin cut poweroff.vbs--------------
dim OpSysSet, obj
Set OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate," & _
"(Shutdown)}//./root/cimv2".ExecQuery _
("SELECT * FROM Win32_OperatingSystem" & _
" WHERE Primary=true"
For Each obj In OpSysSet
obj.Win32Shutdown(8)
Next
--------------end cut------------------------------------