Jump to content

Script to reeboot a 2003 terminalserver


Recommended Posts

Guest JFolke
Posted

Hi, I need a tool that can reeboot my 2003 terminalservers at a sceduled

time at night.

 

Any tips ?

 

Regards

 

Johann Folkestad

  • Replies 2
  • Created
  • Last Reply

Popular Days

Guest Frane
Posted

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

Posted

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


×
×
  • Create New...