How to Enable or Disable Remote Desktop on Windows 10 via Command Prompt
Last Updated: July 30, 2025
The ability to use Remote Desktop on Windows 10 empowers users to access devices remotely, facilitating support and management without the need for physical presence. While this function can be activated through the Settings app, utilizing the Command Prompt or PowerShell offers a more advanced and efficient method, particularly when dealing with multiple systems or distributing configuration scripts.
This comprehensive guide will walk you through the steps to enable or disable the Remote Desktop feature and configure the necessary firewall settings using Command Prompt on Windows 10. The procedures outlined here are equally applicable to Windows 11.
Table of Contents
Enabling Remote Desktop via Command Prompt
To set up the Remote Desktop Protocol using Command Prompt, follow these detailed steps:
-
Open the Start menu on your Windows 10 device.
-
In the search bar, type Command Prompt. Right-click on the top result and select Run as administrator.
-
Enter the following command to enable Remote Desktop Protocol, and then press Enter:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"/v fDenyTSConnections /t REG_DWORD /d 0 /f
-
(Optional) To enable Remote Desktop functionality through Windows Firewall, type the following command and press Enter:
netsh advfirewall firewall set rule group="remote desktop"new enable=Yes
Upon completing the above steps, the Remote Desktop Protocol will be active, allowing you to connect to your device from a remote location.
Stay Updated Subscribe to receive the latest guides and updates directly in your inbox. Subscribe
Disabling Remote Desktop via Command Prompt
If you need to deactivate the Remote Desktop Protocol, follow these straightforward steps:
-
Launch the Start menu.
-
Search for Command Prompt, then right-click the top result and select Run as administrator.
-
Input the following command to disable Remote Desktop Protocol and press Enter:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"/v fDenyTSConnections /t REG_DWORD /d 1 /f
-
(Optional) To close Remote Desktop access via Windows Firewall, enter the following command and press Enter:
netsh advfirewall firewall set rule group="remote desktop"new enable=No
After executing these commands, Remote Desktop will be disabled and the firewall will no longer permit remote connections.
While this guide demonstrates using Command Prompt, similar commands can be employed in PowerShell for managing Remote Desktop. Alternatively, PowerShell provides its own set of dedicated commands for RDP management.
Leave a Reply