6

We have a number of Windows 2003 machines that we RDP on to. Naturally, a lot of people forget to log off, and simply close their rdp window - which causes the max number of sessions exceeded error.

I was just wondering if there was a setting I can set (maybe in group policy?) that forces the session to log off after a period of time?

6

Yes, there is a GPO setting for it located in computer config. You can set it to close out both idle and disconnected sessions after a certain amount of time

Computer Config\Admin Templates\Windows Components\Terminal Services\Sessions

'Set Time limit for active but idle Terminal Services sessions'

'Set time limit for disconnected sessions'

3

If you need to do this immediately, the command line syntax is -

query session /server:<servername>, (will show you the logged on sessions and users)

logoff <sessionID> /server:<servername>

1

As Shial mentioned, you can indeed do it in GPO. You can also do it from the Terminal Services Configuration app as well.

Right-click on RDP-TCP for properties and check out the "Sessions" tab.

0

'Set time limit for disconnected sessions'

A "closed RDP Window" is in effect a disconnected session, so this is the setting to go with. Keep in mind though, that a user who suddenly loses WLAN ceverage and "falls off" is essentially the same, so set this high enough so that you allow users to log back into their session. A couple of minutes if you want to be strict, an hour if you want to be loose. Be sure to inform end-users of whichever policy you set, so that they don't get any unexpected results (I have some customers who assume that they can disconnect their session, shut down their laptops, go home, have dinner, and then reconnect into the same session. THis requires a longer disconnect time limit.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.