Configure Automatically Log Off Idle RDP user Sessions in Windows

  • Post author:
  • Post category:How-To
  • Post last modified:August 16, 2023

Cause of issue

Many times as system admin observed that multiple users connected to remote Windows systems, did their work, and close the remote session without properly log off the user sessions. In that case, multiple applications under that remote session remained running state an utilizing system resources that may cause server slow response that may create a panic situation for other users. So we need to configure automatically log off the idle user sessions.

Resolution: (Automatically Log Off Idle user sessions)

This will be good to overcome the issue, you can configure the system to automatically log off idle user sessions. in such a way, system RAM consumption will reduced for a time being to refresh all in memory data. In this tutorial, we will follow some steps to disconnect user session automatically in windows.

Step 1

  • Press Win + R to open the Run dialog box.
  • Type gpedit.msc and press Enter to open the Group Policy Editor.
Automatically log off-gpedit.msc

Step 2

Open Group Policy Editor, Go to following path

Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits

Look for the policy named “Set time limit for disconnected sessions” and double-click it.

Automatically log off- Set time limit

Step 3

Select the “Enabled” option, and set the desired time limit for disconnected sessions. You can choose a value between 1 minute and 99999 minutes. Setting it to 0 will immediately log off disconnected sessions. In my case selected 30 minutes it means after 30 minutes session will auto disconnected when the user session in idle state.

Click OK to apply the changes.

Automatically log off- enable time selection

Once all the steps completed then restart the computer to take effect of changes fro Automatically log off of disconnected sessions.

Read More Topics

How To Enable Multiple RDP Sessions on Windows Server 2012/2016/2019