AVD applications getting closed on disconnect

Copper Contributor

I am a new user to Azure Virtual Desktop and I would like to know the options to keep the dev applications (Visual Studio, SSMS etc) opened after disconnect. I am looking for something like the "Always On" mode of AWS. 


Its a difficult process to sign-in and open each and every dev tool after sign-in to AVD every time. 


7 Replies
Hi @regimani I'd like to know if you have found a troubleshooting for this.
Do the apps just close when the user disconnects the session?
yes they just close
Do other apps remain open? For example Word or Outlook.

@jay_singh   no all apps gets closed. This happens after certain hours only.



Time limit for disconnected sessions

This policy setting lets you configure a timeout for disconnected Remote Desktop Services sessions on all Windows servers that you use for Load Balancing.

By default, the user always receives a new session as soon as the connection is cancelled. To prevent accidental disconnections and any loss of work progress, it is recommended to define a value at which the user receives a new session. Since longer sessions would affect load balancing, the duration of each session in one click™ is limited to a maximum of 2 hour.


First, open the „Group Policy Editor“ on your server:

  1. Start the execution window by pressing Win + R.
  2. Type gpedit.msc in the execution window and press OK.


  3. The Local Group Policy Editor opens on your system.


  1. Set time limit for disconnected sessions in Windows
  2. Navigate to the following location:
      • Local Computer Policy
      • Computer Configuration
      • Administrative Templates
      • Windows Components
      • Remote Desktop Services
      • Remote Desktop Session Host
      • Session Time Limits
  1. On the right side you will find a list of options. Double-click on Set time limit for disconnected sessions, to open a new window.




  1. By default the session is set to „Not configured“. Double-click on this entry and change the selection to „Enabled“.
  2. Then click OK to confirm your entries. In the now opened window you will see the option „End a disconnected session“ on the bottom left side.
    Set this value to the required time so that any user whose connection has been disconnected will be logged out after this period has passed.
  3. Then click OK to confirm your entries.





  1. Activate „End session when time limit is reached“
  2. Stay in the „Session Time Limits“ folder.
  3. On the right side double-click then End session when time limits are reached.




  1. In the now opened window, check the „Enabled“ option and click on OK to confirm your entries.



  1. Restrict users to one Remote Desktop Services session
  2. Go back to the parent folder Remote Desktop Session Host and click on Connections.
  3. On the right side, you will find a list of different options. Scroll down until you find „Restrict Remote Desktop Services users to a single Remote Desktop Services session“.




  1. Double-click this option and a new window will appear.
  2. Check the „Enabled“ option and click on OK to accept your entries.


From now on, the user can only connect to one single session and – after disconnecting – will continue to have access to his work status for the previously set time without creating multiple open sessions.


  1. Enable policies
  • Restart the server.
  • Or, open Microsoft Power Shell and enter the following command: gpupdate /force The policies are now updated without a restart.
This tells me the session logs the user out. When the user connects again, they create a new session instead of logging back to the existing session.

Is it a shared desktop scenario or a personal desktop?

Have you configured maximum session time restrictions?