In one of my roles we were required to remote onto Windows 7/10 clients via RDS.
The problem, I faced was I would randomly get disconnected ever hour or so and I would be required to login again onto RDWeb and re-launch my session.
The RDS Farm was 2012 R2 with both Gateways and Web Servers in Azure deployed in Availability sets so I was quite confident that this was not an Infrastructure issue. My remote Internet connecion was also solid with no packets being dropped during the RDS disconnects.
I decided to delve into the Event Logs, but for the life of me could not find anything that was cause this issue. I then decided to note the exact time of the disconnects and I started to notice a pattern – Every time a GPUpdate refresh occurred, this coinciding with my RDS disconnects – this was backed up by viewing the gpsvc.log, which can be found in: (WINDIR%\debug\usermode\gpsvc.log).
When the refresh takes place the security policies registry key gets deleted,and then re-added – during this moment the user looses their remote desktop connection.
To fix this we can create the following regkey:
Change to 0