RTFM_ security field notes

RDP

Enable or disable Remote Desktop and its firewall rule through the registry and PowerShell.

Enable RDP

These commands change host configuration and require administrative rights. They do not grant an account RDP logon rights; firewall rule-group names can also differ on localized Windows installations.

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

Disable RDP

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
netsh advfirewall firewall set rule group="remote desktop" new enable=No
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 1
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"
Provenance and confidence
Version
2
Sources reviewed
2026-11-23
Confidence
medium — Legacy RTFM; v2 editorial review on 2026-11-23 separates CMD/PowerShell syntax and clarifies administrative and logon-right requirements. No host changes.

Also searched as: rdp, bureau à distance, activer rdp, terminal server