Computer Shutdown program

You would have to use the API or WMI to do the task, Here is a VBscript that can do the task in WMI.

VB.NET:
Expand Collapse Copy
strComputer = "atl-dc-01"
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
 
Back
Top