Restarts a computer
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 colOperatingSystemsObjOperatingSystem.Reboot()Next
This is a VB Script, this can be used by saving the file in .vbs file