SCRIPT: VBScript Reboot Code

Table of Contents

SCRIPT: VBScript Reboot Code

[source]

Set OpSysSet = GetObject("winmgmts:{authenticationlevel=Pkt," _
& "(Shutdown)}").ExecQuery("select * from Win32_OperatingSystem where "_
& "Primary=true")
for each OpSys in OpSysSet
retVal = OpSys.Reboot()
next

[/source]

Leave a Reply