We have an aging Terminal Server running 2003 R2. It serves about 20 people or so and there is one app in particular that when it crashes, it begins a cascading effect and starts to crash for other users on the terminal server as well.
A re-boot is the best option at this point because the vendor is not cooperating. We would like to automate a re-boot at a given time each night. But we would like to make sure there are no "active" sessions before we do it.
Is there a way to have a script check to see if there are no "non-idle" sessions, and re-boot if there are not?
I know I could just create a BAT file that says "shutdown -r" but I would like to NOT kick active users if they are working late or off hours.
This is only to get us through about 30-60 days until we move them off to VDI.
Thanks,
anthony
There should be only one World's Greatest Dad shirt. And you should have to kill the previous owner to wear it.
You could for example: a) do a "query session" and process that output to determine if you can or can't reboot b) install Powershell and use the Terminal Services module from Shay Levy (http://archive.msdn.microsoft.com/PSTerminalServices) to achieve the same thing more elegantly