View Single Post
Old 05-20-2004, 08:15 AM   #6 (permalink)
hrdwareguy
"Officer, I was in fear for my life"
 
hrdwareguy's Avatar
 
Join Date: Apr 2003
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   Reply With Quote