Jeff Giroux
2004-04-14 20:51:32 UTC
Is there a way to force a reboot incase the user "locked" the machine with
the below script. I can reboot the machine when logged in or not, but if
the user does CTRL+ALT+DEL and then chooses Lock Computer, then the script
will not reboot the machine. Is there a force command?
strComputer = "remotePC"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer &
"\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next
the below script. I can reboot the machine when logged in or not, but if
the user does CTRL+ALT+DEL and then chooses Lock Computer, then the script
will not reboot the machine. Is there a force command?
strComputer = "remotePC"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}!\\" & strComputer &
"\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Reboot()
Next