Windows Scripting Host can be used for many things. One frequently used feature is rebooting remote computers. The code below shows how to do that. Simply copy the code and save it as reboot_remote_pc.vbs. Please note that you must have administrator rights on the remote computer in order for this to work

WS = InputBox(“Enter computer name”)
  strComputer = WS

Set objWMIService = GetObject(“winmgmts:” _
  & “{impersonationLevel=impersonate,(Shutdown)}!” _
  & strComputer & “rootcimv2″)

Set colOperatingSystems = objWMIService.ExecQuery _
  (“Select * from Win32_OperatingSystem”)

For Each objOperatingSystem in colOperatingSystems
  ObjOperatingSystem.Reboot()
  Next