question

MarkoTodorovic-7973 avatar image
0 Votes"
MarkoTodorovic-7973 asked GraceHE-MSFT commented

The best way to customize a job that will terminate idle Remote Desktop sessions

Hi all,

I was looking for some solutions that would best fit for this type of request but I need help from you MS pros what would be the best way to do it.

Scenario: We have couple of terminal servers (RDS licensed) that bunch of users use for their operational / day-to-day work. As it is well known, plenty of users forget or simply don't think about signing out from those RDP sessions at the end of their work. The result here is their sessions staying idle in Task Manager, eating up a lot of memory which slows down the machines.

My first thought was to set up a policy in computer management that will terminate those sessions every 24hrs but, here comes the question how to customize the solution and go for a different approach. Because couple of users should not be disturbed by this policy and I would like to make an exception for them (as they need their sessions to stay intact).

What would be the better option here? To come up with a script that will terminate users but with exception of already stated usernames? All of those users (those whose sessions should be terminated and those which shouldn't) are members of the same OU in AD.

Thanks a lot for your assistance and keep it up!

Marko

remote-desktop-services
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,
We are looking forward to your reply and ready for help.

0 Votes 0 ·

Hi,
How is it going? Please feel free to let us know your feedback.

---If the suggestions above are helpful, please ACCEPT ANSWER. Really appreciate. This will also help others with similar issue to find this post quickly. ---

0 Votes 0 ·

1 Answer

GraceHE-MSFT avatar image
0 Votes"
GraceHE-MSFT answered GraceHE-MSFT commented

Hi Marko,
Thank you for posting your query. According to your description, you have tried editing the group policy. To achieve your goal, you have missed some details. Here are some suggestions.
To set the group policy correctly, you can refer to this official document.
Configure Timeout and Reconnection Settings for Remote Desktop Services Sessions
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc754272(v=ws.11)?redirectedfrom=MSDN
To know information about sessions on a Remote Desktop Session Host (RD Session Host) server, you can refer to this link.
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc731503(v=ws.11)?redirectedfrom=MSDN

The key point to solve your problem is setting a new GPO. For you want some particular users not to be teminated, setting GPO and then apply the group policy to this GPO is of great importance.
To set up a new GPO, you can refer to this link.
https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-firewall/create-a-group-policy-object

---If the suggestions above are helpful, please ACCEPT ANSWER. Really appreciate. This will also help others with similar issue to find this post quickly. ---

Best Regards,
Grace

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi there,

Unfortunately I'm not sure this GPO will work in the way that I need.
I'm already familiar with the Session Time Limits policies but they affect all users found idle or disconnected. I need help activating the policy but with exception of couple of predefined users who will be excluded when the policy triggers it's action and starts "killing off" all other users who are idle or d'ced.
How do I exclude those couple of users from it?

Cheers,
Marko

0 Votes 0 ·

Hi,
Thank you for your feedback. I think group policy will work for it can be applied to certain users.

---If the suggestions above are helpful, please ACCEPT ANSWER. Really appreciate. This will also help others with similar issue to find this post quickly. ---

Best Regards,
Grace

0 Votes 0 ·