If an off-site server needs to be accessed via Remote Desktop Connection (RDC) client immediately, yet the Remote Desktop is not enabled on the server, it is a royal pain in the ass. Luckily it’s possible to remotely enable and turn of the Remote Desktop service on a remote PC or server by remotely editing its registry.
- Login to the workstation with administrator credentials.
- Run Registry Editor (regedit).
- Click File
- Select the Connect Network Registry in the pull down menu.
- Enter the name of the required computer and press OK
- A node for the remote computer network registry will be displayed in the Registry Editor with HKEY_LOCAL_MACHINE (HKLM) and HKEY_USERS (HKU) hives.
- Navigate to the following registry key for the remote computer: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
- In the right pane, locate a REG_DWORD value named fDenyTSConnection. Double-click on fDenyTSConnection and change the value data from 1 (Remote Desktop disabled) to 0 (Remote Desktop enabled).
- Reboot the remote machine by issuing the following command: shutdown -m \\hostname -r