View Single Post
Old 05-20-2004, 06:15 AM   #6 (permalink)
hrdwareguy
"Officer, I was in fear for my life"
 
hrdwareguy's Avatar
 
Location: Oklahoma City
Reboot script, copy the following into notepad or something and save it as a .vbs file. This will reboot a machine when executed.

Code:
' Copyright (c) 1997-1999 Microsoft Corporation
'***************************************************************************
' 
' WMI Sample Script - System reboot (VBScript)
'
' Invokes the Reboot method of the Win32_OperatingSystem class
' NOTE:  You must have the Shutdown privilege to successfully invoke the Shutdown method
'
'***************************************************************************
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")

for each OpSys in OpSysSet
	OpSys.Reboot()
next
__________________
Gun Control is hitting what you aim at

Aim for the TFP, Donate Today
hrdwareguy is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46