Remotely enable or disable remote desktop on a Windows Server - TechRepublic

Remotely enable or disable remote desktop on a Windows Server

Remote desktop is the de facto administration tool, but sometimes it stops accepting connections. Read this tip to learn how to remotely enable or disable remote desktop.

Verfasst von
Rick Vanover
Rick Vanover
Jun 2, 2010
We may earn from vendors via affiliate links or sponsorships. This might affect product placement on our site, but not the content of our reviews. See our Terms of Use for details.

Last year, I shared a few of my favorite tips to address remote desktop issues. I’ve discovered a new trick that can reconfigure remote desktop remotely; this is especially important if you don’t have monitor (console) access, a network-attached KVM, someone local to the server console, or a hardware device such as an HP iLO or Dell DRAC.

Remote desktop for Windows Servers can be set through the registry. Remote access of the Windows registry is enabled by default (when Firewall is disabled), and remote desktop can be disabled or enabled. The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections value is set to 1 by default to disable remote desktop; editing the value remotely to 0 will enable remote desktop on the next reboot. You can make a reboot happen immediately with either the shutdown command or the Restart-Computer PowerShell command. Please refer to one of my previous tips to learn how to launch these two commands.

Opening the fDenyTSConnections value through a remote registry (Figure A) is done with administrative permissions via Regedit and selecting the Connect Network Registry option from the File menu. (Note: Editing the registry is risky, so be sure you have a verified backup before saving any changes.)
Figure A

Remotely opening the fDenyTSConnections registry value. (Click the image to enlarge.)

In order to make the change take effect, a reboot is required.

This configuration is a documented procedure and is outlined in this TechNet article. Remote desktop can be enabled or disabled on the fly when configured in Server Manager (Windows Server 2008) or on the Remote tab of My Computer (Windows Server 2003).

If you have used this trick to troubleshoot remote desktop, let us know in the discussion.

Stay on top of the latest Windows Server 2003 and Windows Server 2008 tips and tricks with our free Windows Server newsletter, delivered each Wednesday.


Automatically sign up today!

Rick Vanover

Rick Vanover is an IT Infrastructure Manager for Alliance Data in Columbus, Ohio. Rick's IT certifications include VMware VCP, Microsoft Windows Server 2008 MCITP, Windows Server 2003 MCSA and others. \ \ Previous experiences included working for Dematic Corp (formerly Siemens L&A, Siemens Dematic, Rapistan)in Grand Rapids, MI in various capacities deploying custom software solutions to the material handling industry using a mix of current hardware and software products. You can reach Rick at b4real@usa.net. Follow rick on Twitter at @RickVanover