Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 Remote Desktop Services / Terminal Services
 Automated Reboot?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

anthony
Moderator

USA
2373 Posts
Status: offline

Posted - 03/01/2012 :  4:35:32 PM  Show Profile  Reply with Quote
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.

Rambler
Major Contributor

Czech Republic
949 Posts
Status: offline

Posted - 03/01/2012 :  5:04:04 PM  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2011 Mark Minasi Go To Top Of Page
This page was generated in 0.11 seconds. Snitz Forums 2000