Windows Terminal Server Session Limits Registry Key
Managing session limits on a Windows Terminal Server (Remote Desktop
Services) allows administrators to automatically control how long
active, idle, and disconnected sessions remain on the server. This guide
covers the exact Windows Registry locations and corresponding DWORD
values used to configure Remote Desktop session limits directly through
the Registry Editor (regedit).
Primary Registry Key
The primary registry key that holds the default configuration parameters for Terminal Server session limits is:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Key Configuration Parameters
Inside the RDP-Tcp key, the following
DWORD (32-bit) values define the specific session limit
behaviors:
- MaxIdleTime: Controls the maximum amount of time an inactive session can remain connected before it is disconnected or terminated.
- MaxDisconnectionTime: Specifies the maximum amount of time a disconnected session remains open on the server before the session is ended completely.
- MaxConnectionTime: Sets the maximum duration an active Remote Desktop session can exist continuously before being disconnected.
Note: The time values for these parameters are stored as integers
representing milliseconds (e.g., 600000 equals 10 minutes).
Setting any of these values to 0 disables the limit (set to
“Never”).
Group Policy Registry Location
If session limits are enforced via Local Group Policy or Active Directory Group Policy Objects (GPO), the settings are stored and take precedence in the following policy registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
The values under this key use the same naming conventions
(MaxIdleTime, MaxDisconnectionTime, and
MaxConnectionTime) and will override the parameters set in
the WinStations\RDP-Tcp path.