Running GPUpdate on a Remote Desktop Disconnects Your Session

RDP Disconnect ErrorI encountered this error when trying to update group policy on a remote machine.  I kept getting disconnected and it’s very frustrating reconnecting after every gpupdate.  I found this tweak that will resolve this issue.

When group policy is refreshed the policy settings are deleted and then reset.  During this time the configuration on the remote machine is temporarily valid.  Which then all sessions may be disconnected.

You can apply this setting via Group Policy or via command line:

To Add/Update:
PS: New-Item -Type DWord -Path HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections  -Value "0" -Force
CMD: REG ADD HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server /v fDenyTSConnections /t REG_DWORD /d 0 /f

To Verify:
PS: Test-Path -Path HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections
CMD: REG QUERY HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server /v fDenyTSConnections

 

Ref: http://support.microsoft.com/kb/2083411

2 Replies to “Running GPUpdate on a Remote Desktop Disconnects Your Session”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.