Enable RDP via CMD

To enable RDP with the Command Prompt, use the following steps.

  1. Launch Command Prompt as Administrator
  2. Type the following command

Reg add “HKEY_LOCAL_MACHINE\SYSTEM\CurentControlSet\Control\Terminal Server”  /v fDenyTSConnections /t REG_DWORD /d 0 /f

You can also achieve the same via PowerShell using the command

Set-ItemProperty -Path “HKLM:\System\CurrentControlSet\Control\Terminal Server” -Name “fDenyTSConnections” –Value 0

This command alone will not enable the firewall rules for RDP port 3389 so you will also need to run the below

Netsh advfirewall firewall set rule group=”remote desktop” new enable=yes

You can also achieve the same via PowerShell using the command

Enable-NetFirewallRule -DisplayGroup “Remote Desktop”

If you found this article helpful, would you consider buying me a Coffee?