Microsoft MVP Jeremy Moskowitz shows you how to prevent disconnect during GP update / force using registry settings.
How to Prevent a Remote Desktop Connection Drop During GP Update
Hi, everybody. This is Jeremy Moskowitz, Group Policy MVP and Founder of PolicyPak Software. In this super short video, I’m going to show you how to work around the most annoying thing. You’ve seen this. You’ve had this problem. We’re going to fix it together.
Let me show you this problem. You’ve used RDP and connected as some standard user or as an admin to some endpoint machine. You decide you’re going to do something in Group Policy-land, and you decide you want to check to see if it’s working. So you go to run a Command prompt, and you run “gpupdate /force.” You’ve seen this. What happens? The connection drops. That’s no fun.
It turns out there’s a garden-variety pack of ways you can solve this. One way is you can walk up to the machine, or you could use Group Policy. For this demonstration, I’m going to just walk up to the machine and show you the registry punch you would need to do to make this problem go away.
Let me reconnect to my Computer 1 here. I’m going to log on as an admin here. That’s “trixie.” Now that I’m logged on as the admin, see? The session is still there. Let’s just run “regedit” here. I’m the local admin, and I have to find this setting. This “HKEY_LOCAL_MACHINE” under “SYSTEM,” and we dive down under “CurrentControlSet.”
Once we’re on “CurrentControlSet,” we’re going to just “Find” a value. The value we’re looking for is kind of weird. It’s called “fDeny.” Actually, it’s “fDenyTSConnections,” but if you just search for “fDeny” here, there it is. You’re looking for “fDenyTSConnections.”
You can see it’s a “1” here. Check this out. If you set it just to “0” and click “OK” here, what should happen is the next time you run “gpupdate /force,” magic. It doesn’t close the session, and you’re ready to go.
If you’ve ever had this problem where you’re trying to remote into a machine, run GP Update to test something, and for the love of Pete it’s not working, just remember you can use that registry setting. You can blast that same registry setting out using Group Policy Preferences or PolicyPak or any number of items and get it out there, and you’ll be ready to go.
I hope this video helps you out. Talk to you soon.