Script to restart server when no user is remotely connected

RitonLaJoie asked:

I’m looking for something special : here is a windows server that is used for development by 4/5 people remotely working on it through remote control.

I’m installing Visual Studio 2010 on it, and the installation won’t continue until the server has been restarted. I’m looking for a way to reboot when the server is idle (when nobody is connected through remote desktop on it) so that the reboot doesn’t bug anyone.

Is there some software that can do that ?

Thanks !

My answer:


Here’s a script:

  1. Find out what time none of the developers are likely to be logged in. For this example we will use 3 am through 7 am as the time that no developers are expected to be logged in.
  2. Email the developers and inform them the server will be rebooted at 3 am.
  3. Reboot the server at 3 am.

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.