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”

Found priceless insights in this blog? Support the author’s creativity – buy them a coffee!

1 thought on “Enable RDP via CMD

Leave a Reply

Your email address will not be published. Required fields are marked *