Share via


Configure Timeout and Reconnection Settings for Remote Desktop Services Sessions

Applies To: Windows Server 2008 R2

By default, Remote Desktop Services allows users to disconnect from a remote session without logging off and ending the session. When a session is in a disconnected state, running programs are kept active even though the user is no longer actively connected.

You can limit the amount of time that active, disconnected, and idle (without user input) sessions remain on the server. This is useful because sessions that remain running indefinitely on the RD Session Host server continue to consume system resources.

Configuring timeout and reconnection settings on a per connection basis affects all sessions that use the connection.

You can configure timeout and reconnection settings on a per user basis by using the Remote Desktop Services Extension to the Local Users and Groups snap-in or to the Active Directory Users and Computers snap-in.

Timeout and reconnection settings configured by using Remote Desktop Session Host Configuration will take precedence over timeout and reconnection settings that have been configured for a specific user account.

You can configure the following timeout and reconnection settings in Remote Desktop Session Host Configuration.

Setting Details

End a disconnected session

Specify the maximum amount of time that a disconnected user session is kept active on the RD Session Host server. If you specify "Never," the user's disconnected session is maintained for an unlimited time.

When a session is in a disconnected state, running programs are kept active even though the user is no longer actively connected.

Active session limit

Specify the maximum amount of time that the user's Remote Desktop Services session can be active before the session is automatically disconnected or ended.

The user receives a warning two minutes before the Remote Desktop Services session is disconnected or ended, which allows the user to save open files and close programs.

Idle session limit

Specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before the session is automatically disconnected or ended.

The user receives a warning two minutes before the session is disconnected or ended, which allows the user to press a key or move the mouse to keep the session active.

When a session limit is reached or connection is broken

Specify whether to disconnect or end the user's Remote Desktop Services session when an active session limit or an idle session limit is reached.

If the user's session is disconnected, the programs that the user is running are kept active even though the user is no longer actively connected.

If the user's session is ended, the user will need to establish a new Remote Desktop Services session with an RD Session Host server.

Use the following procedure to specify the timeout and reconnection settings for a remote session.

Membership in the local Administrators group, or equivalent, on the RD Session Host server that you plan to configure, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at https://go.microsoft.com/fwlink/?LinkId=83477.

To specify timeout and reconnection settings for a remote session

  1. On the RD Session Host server, open Remote Desktop Session Host Configuration. To open Remote Desktop Session Host Configuration, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Session Host Configuration.

  2. Under Connections, right-click the name of the connection, and then click Properties.

  3. In the Properties dialog box for the connection, on the Sessions tab, select the following options as necessary:

    • Select the Override user settings check box, and then set timeout settings for End a disconnected session, Active session limit, and Idle session limit.

    • Select the Override user settings check box, and then select one of the following reconnection settings: Disconnect from session or End session.

  4. Click OK. Changes to timeout and reconnection settings are not applied to sessions that are connected when the change is made. The changes will take effect the next time the user establishes a new connection to the RD Session Host server.

You can also configure timeout and reconnection settings by applying the following Group Policy settings:

  • Set time limit for disconnected sessions

  • Set time limit for active but idle Remote Desktop Services sessions

  • Set time limit for active Remote Desktop Services sessions

  • Terminate session when time limits are reached

These Group Policy settings are located in the following locations:

  • Computer Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits

  • User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits

These Group Policy settings can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC).

Note

These Group Policy settings will take precedence over the settings configured in Remote Desktop Session Host Configuration. If both the Computer Configuration and the User Configuration policy settings are configured, the Computer Configuration policy settings take precedence.

For more information about Group Policy settings for Remote Desktop Services, see the Remote Desktop Services Technical Reference (https://go.microsoft.com/fwlink/?LinkId=138134).

For information about configuring timeout and reconnection settings on a per user basis, see the topic "<UserAccount> Properties: Sessions Tab" in the Remote Desktop Services User Properties Help in Windows Server 2008 R2.

Additional references