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
ryanquiggin I'm actually having the exact same issue in testing. Did you ever get it fixed?
What's happening for me is that if a user disconnects their session stays logged in in a disconnected state as you can see in task manager. But when they log back in you can see in the fslogix operational log that fslogix unloads the profile and then loads it again.
- ryanquigginOct 30, 2019Copper Contributor
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.
- David BrophyOct 30, 2019Brass Contributor
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 10, 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.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!
- David BrophyOct 30, 2019Brass ContributorThanks, I'll give that a try.