Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
anthony
Posted - 03/01/2012 : 4:35:32 PM 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,
1 L A T E S T R E P L I E S (Newest First)
Rambler
Posted - 03/01/2012 : 5:04:04 PM 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