Remote Desktop disconnected user doesn't get logged off


  • We are running a VDI environment with a pool of Windows XP virtual desktops.
    When a user disconnects the session without logging off, we notice that the virtual desktop remains in use for a long time, and cannot be used by another user.

    We have configured the following GPO settings on the virtual desktops OU, but apparantly this did not help:

    • Computer Configuration > Policies > Administrative Templates > Windows Components/Terminal Services/Terminal Server/Connections
      Configure keep-alive connection interval: Keep-alive interval: 1
    • Computer Configuration > Policies > Administrative Templates > Windows Components/Terminal Services/Terminal Server/Session Time Limits
      Set time for disconnected sessions: End a disconnected session: 1 minute
      Terminate session when time limits are reached: Enabled

    We refreshed the policy on all virtual desktops. We tought this GPO would make sure that a disconnected session is logged off after one minute.
    But when a user disconnects from the virtual desktop without logging off, we still notice the virtual desktop being in use and locked for another user for a long time.


    Wednesday, May 12, 2010 11:19 AM

All replies

  • Those settings will only apply to Terminal Servers (or Remote Desktop Session Hosts). Because Windows XP is a desktop OS, I would think that what you are seeing is expected behaviour. 3rd party solutions such as Citrix XenDesktop and VMware View will log sessions off or reboot virtual desktops automatically.

    Have you tested with Windows 7 to see if the same behaviour occurs?

    Wednesday, May 12, 2010 12:51 PM
  • Unfortunately, I have no Windows 7 virtual machines available to test with.
    The final deployment will be using Windows XP machines too.

    I found the GPO settings in a document that describes GPO settings to use with Citrix VDI:

    (We will be using Quest vWorkspace, not Citrix)

    Wednesday, May 12, 2010 1:46 PM
  • Hello Bart,

    Please reproduce the issue (use group policy to disconnect the session and try to connect with another user). Then, run the following PowerShell script on the RD Connection Broker (reponsible for the VDI) and check the VM assignment information:

    Query Virtual Machine assignment information

    With this script, we can find if the VM is still occupied by certain users.

    Besides, please let me know if you're using virtualization pool or personalized desktop, and if the desktop is only assigned to certain users.


    Lionel Chen

    TechNet Subscriber Support in forum

    If you have any feedback on our support, please contact tngfd@microsoft.com

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, May 19, 2010 5:56 AM
  • Hi,

    We are not using the Microsoft VDI broker.
    We have decided to work with the Quest vWorkspace broker in which we are using a desktop pool.

    When I connect to the console of the virtual desktop using SCVMM, I can see that the virtual machine is locked and is still in use by the user that disconnected it's session without logging off a few hours ago.
    We of course would like to automatically log off the user if the session is disconnected by using GPO, which doesn't seem to work.


    Wednesday, May 19, 2010 1:40 PM