Enable Remote Desktop from the command line

Flip fDenyTSConnections to 0 to allow RDP connections to this PC.

Windowsadminremote-desktopsettingsMedium risk
Run `reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f` in an administrator terminal to enable Remote Desktop.

01Command

Command
$ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

02What it does

Windows records whether incoming Remote Desktop is denied in the fDenyTSConnections value; setting it to 0 enables RDP, and 1 disables it again. After enabling, also allow Remote Desktop through the firewall with `netsh advfirewall firewall set rule group="remote desktop" new enable=Yes`. Any account that connects needs a password, and Home edition does not accept RDP connections.

03Risk

RiskMedium risk
RequirementsAdministrator terminal required. Home edition does not support incoming Remote Desktop. The firewall must also allow Remote Desktop.
!Warning: Enabling RDP exposes a login surface to your network — keep the firewall on, use a strong password, and run the undo command to disable it again when not needed.

04Undo

Undo
$ reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f

05Sources

Last verified: 2026-09-18 · Category: Network