Forum Discussion
User's logged off when they disconnect their session
- Oct 10, 2019
ryanquiggin : Please review the timeout policies. See this article here: https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-customize-master-image#configure-session-timeout-policies
David Brophy In the end, I created a new VM image from scratch using the Windows 10 Multisession +Office 365 apps built into the WVD deployment template. This resolved the issue. I think previously I used the Windows 10 Multisession image without the 365 apps and thats what gave me issues.
ryanquiggin I figured it out. I was following the article described at https://docs.microsoft.com/en-us/azure/virtual-desktop/set-up-customize-master-image#software-preparation-and-installation which references the below registry entries. I deleted them from my VM and all good now. I'd imagine it was the RemoteAppLogoffTimeLimit set to 0.
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fResetBroken /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxConnectionTime /t REG_DWORD /d 10800000 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v RemoteAppLogoffTimeLimit /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxDisconnectionTime /t REG_DWORD /d 5000 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v MaxIdleTime /t REG_DWORD /d 10800000 /f
- knowliteDec 09, 2019Iron Contributor
Remote app logoff limit makes sure the session is logged off when all programs are closed (hence remote app).
Disconnect time 5000 should be much longer (this is less than a minute!)https://getadmx.com/?Category=Windows_8.1_2012R2&Policy=Microsoft.Policies.TerminalServer::TS_SESSIONS_Disconnected_Timeout_1
Active session time is also set to 3 hours, users getting logged out at 11am when they start at 8am.https://getadmx.com/?Category=Windows_8.1_2012R2&Policy=Microsoft.Policies.TerminalServer::TS_SESSIONS_Limits_1
Changed this to 16 hours in my environment. I see that the referenced ms docs is no longer mentioning these registry keys (probably for a reason?).
Good luck with your environment!