Working in a geographically distributed Windows Server environment I often found that most servers have a number of idle RDP connection. As Windows Server only allows for two concurrent Remote Desktop connections for administration you are sometimes faces with the choice of disconnecting other user blindly or in the case of Windows Server 2003 not to be able to connect at all. The same applies also to some Virtual Client machine hosting legacy application that a frequently used by different users, who would not have administrator right to force a disconnect.
The obvious way to address this issue is to use a Group Policy do disconnect any idle session after a given time period. The are few more settings that can be set in this regards like as to whether to keep application running or not when disconnecting (Microsoft Technet Article).
We want to set a time-out limit for an active RDP session when this has been reached for all computer in a giving OU. To do this open the Group Policy Management Editor and go to …
Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits
… and enable “Set time for active Remote Desktop Services sessions” and “End session when time limits are reached”. When done apply GPO and test.