I'm looking for some guidance on maintaining my RDS servers. We have a setup with 6 Remote Desktop servers, plus a broker and a gateway. I want to find a way to automatically disconnect idle sessions after they've been inactive for a while to free up resources. I'd love to hear any tips on scripts or methods you might suggest. Also, if a user reconnects while their session is in an idle disconnected state, can they pick up right where they left off?
6 Answers
You can manage this using group policies instead of scripts. Look for the session time limits under group policy settings. Just to clarify, when a session is disconnected, it remains active, consuming resources. If the user logs back in, they'll return to their same session with all their applications intact. However, if they are logged off completely, they will find their apps closed upon reconnection.
There are built-in options in the collection properties that let you set idle disconnect and log off timings. This is usually the easiest way to manage inactive sessions.
You can easily handle idle session disconnections directly through the deployment properties of your RDS setup, so no scripts or GPOs are necessary here.
After managing RDS for 15 years, I've found that most settings can be configured through the UI or GPO. Also, as a maintenance tip, it's wise to keep one session host closed for regular maintenance.
You might want to look into this GitHub resource: [GitHub - lithnet/idle-logoff](https://github.com/lithnet/idle-logoff), it offers a useful solution for managing idle logoffs.
Check out the idle and disconnected session settings in your RDS collection properties. I suggest being cautious with how aggressively you log off users, especially if you have remote users. And yes, when they reconnect, they will pick up their disconnected session.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures