Script to reeboot a 2003 terminalserver

  • Thread starter Thread starter JFolke
  • Start date Start date
J

JFolke

Guest
Hi, I need a tool that can reeboot my 2003 terminalservers at a sceduled
time at night.

Any tips ?

Regards

Johann Folkestad
 
Re: Script to reeboot a 2003 terminalserver

strComputer = "localhost" 'or your computer name
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
--
Create VBS file with this in it, then create schedule task to run everyday
in particular time. That's it.


--
____________________________________
Frane Borozan
Terminal Services and Citrix Presentation Server user logging
http://www.terminalserviceslog.com
 
Re: Script to reeboot a 2003 terminalserver

tsshutdn /reboot
DK

"JFolke" <johannf@hotmail.com> schrieb im Newsbeitrag
news:uBpOOChnIHA.4480@TK2MSFTNGP03.phx.gbl...
> Hi, I need a tool that can reeboot my 2003 terminalservers at a sceduled
> time at night.
>
> Any tips ?
>
> Regards
>
> Johann Folkestad
 
Back
Top