Enable Remote Desktop from the command line
Flip fDenyTSConnections to 0 to allow RDP connections to this PC.
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 /f02What 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
!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 /f05Sources
- Allow access to your PC from outside your app's networkEvidence: Describes enabling Remote Desktop and that fDenyTSConnections under Terminal Services controls RDP access.
- Reg - Read and edit the registryEvidence: reg query syntax for reading registry values such as ProxyEnable under HKCU Internet Settings.
Last verified: 2026-09-18 · Category: Network