How to Disable Remote Desktop on Windows 11

Key Takeaways

  • You can disable Windows 11’s Remote Desktop feature by heading to Settings > System > Remote Desktop and turning off the Remote Desktop toggle.
  • You can also use commands in Command Prompt and PowerShell to turn off Remote Desktop.
  • Later, it’s easy to turn the feature back on if you want.



If you don’t intend to remotely connect to your PC, it’s a good idea to keep the Remote Desktop feature disabled. This ensures your machine is secure even if your login credentials are compromised. Here are a few ways to turn off Remote Desktop on Windows 11.

All methods achieve the same end result, which is to deactivate Remote Desktop. Therefore, feel free to use the method you find convenient.


Disable Remote Desktop From Settings

The easiest graphical way to disable Remote Desktop is by using Settings.

Start by launching Settings using Windows+i. From the left sidebar, select “System.” On the right pane, scroll down and choose “Remote Desktop.”

'System' and 'Remote Desktop' highlighted in Settings.

On the following screen, turn off the “Remote Desktop” toggle.


To re-enable Remote Desktop in the future, turn on the “Remote Desktop” toggle.

The 'Remote Desktop' toggle highlighted in Settings.

In the Disable Remote Desktop prompt, select “Confirm.”

'Confirm' highlighted in the Remote Desktop prompt.

Remote Desktop is now disabled.


Shut Off Remote Desktop Using Command Prompt

You can use a command in Command Prompt to prevent the Remote Desktop service from launching on your PC’s boot. This doesn’t disable the feature but ensures the feature doesn’t run when your computer turns on.

To use this method, access Windows Search, type Command Prompt, and select “Run as Administrator.”

'Run as Administrator' highlighted for Command Prompt.

In the User Account Control prompt, choose “Yes.”

In Command Prompt, type the following command and press Enter. This command stops the Remote Desktop service.

net stop termservice 

Next up, type the following command and press Enter. This command prevents the Remote Desktop service from launching on the PC’s boot.

sc config termservice start= disabled 
The command to disable the Remote Desktop service typed in Command Prompt.


Close the Command Prompt window by typing the following command and pressing Enter:

exit 

You’re done.

To re-enable Remote Desktop in the future, run the following commands from an elevated Command Prompt window. Make sure to press Enter after each command.

sc config termservice start= auto
net start termservice

Use Control Panel to Disable Remote Desktop

You can use the traditional Control Panel utility to turn Remote Desktop on and off.

Start by opening Control Panel. One way to do this is to open Windows Search, type Control Panel, and select the utility in the search results.

Control Panel highlighted in Windows Search.

In Control Panel, select “System and Security.”

'System and Security' highlighted in Control Panel.


In the System section, choose “Allow Remote Access.”

'Allow Remote Access' highlighted in Control Panel.

The System Properties window will launch. Access the “Remote” tab and enable the “Don’t Allow Remote Connections to This Computer” option. Then, choose “Apply” followed by “OK.”

To re-activate Remote Desktop, enable the “Allow Remote Connections to This Computer” option.

Various options highlighted in the 'Remote' tab of the 'System Properties' window.


You’ve successfully disabled Remote Desktop.

Using PowerShell

In PowerShell, you can run a command (called a cmdlet) to change a Windows registry value that disables Remote Desktop.

To use this method, open Windows Search, type PowerShell, and choose “Run as Administrator.”

'Run as Administrator' highlighted for PowerShell.

In the User Account Control prompt, select “Yes.”

In PowerShell, type the following command and press Enter:

Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 1 
The cmdlet to disable Remote Desktop typed in PowerShell.

Here’s what each parameter does in this cmdlet:


  • Set-ItemProperty: This changes the specified registry item’s value.
  • -Path: This is the path to the registry item to be modified.
  • fDenyTSConnections: This is the name of the item to be modified.
  • -value 1: This is the new value for the item.

PowerShell has disabled Remote Desktop. To re-enable the feature in the future, run the following cmdlet:

Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0 

With Local Group Policy Editor

On Windows 11’s Pro edition, you can use the Local Group Policy Editor tool to disable Remote Desktop. Note that this tool isn’t available on Windows 11’s Home edition. We have a guide on how to check your Windows 11 edition, so check that out to find your edition.

To use the method, open the Run dialog box by pressing Windows+R. Type the following in the box and press Enter (or select “OK”).

gpedit.msc 

When Local Group Policy Editor opens, navigate to the following path:

Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Connections 

On the right pane, double-click the item that says “Allow Users to Connect Remotely by using Remote Desktop Services.”


'Allow Users to Connect Remotely by using Remote Desktop Services' highlighted in Local Group Policy Editor.

On the open window, select the “Disabled” option. Then, at the bottom, choose “Apply” followed by “OK.”

In the future, you can re-enable the feature by choosing “Not Configured.”

Various options to disable Remote Desktop highlighted in Local Group Policy Editor.

Close Local Group Policy Editor.


Using Registry Editor

The Registry Editor method works on both Pro and Home editions of Windows 11. You simply change a registry item’s value and that disables Remote Desktop.

Start by launching Run using Windows+R. Type the following in the open box and press Enter or select “OK.”

regedit 

In the User Account Control prompt, select “Yes.”

In Registry Editor, navigate to the following path. A quick way to do this is to copy the following path, paste it in Registry Editor’s path box, and press Enter.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services 

On the right pane, right-click anywhere blank and choose New > DWORD (32-bit) Value.

New > DWORD (32-bit) Value highlighted in Registry Editor.

Type fDenyTSConnections as the new item name and press Enter. Then, right-click the newly created item and choose “Modify.”


'Modify' highlighted for 'fDenyTSConnections' in Registry Editor.

Type 1 in the “Value Data” field and select “OK.”

In the future, you can reactivate the feature by typing
0
in the “Value Data” field.

'Value Data' and 'OK' highlighted for 'fDenyTSConnections' in Registry Editor.

Close Registry Editor.


Using a Batch File

If you often need to toggle Remote Desktop off and on, create a batch file to automate the task. This file will turn off the feature if it’s enabled and turn on the feature if it’s disabled. You simply have to double-click the file to make that happen.

To make the batch file, open Windows Search, type Notepad, and select the app in the search results.

Notepad highlighted in Windows Search.

Copy the following code and paste it in Notepad. This code runs a query to check whether Remote Desktop is enabled or disabled. It then toggles the feature on or off, depending on the current status.

@echo off

for /f "tokens=3" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fDenyTSConnections') do set fDenyTSConnections=%%a

if "%fDenyTSConnections%"=="0x0" (
    echo Remote Desktop is enabled. Disabling...
    powershell.exe -Command "Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fDenyTSConnections' -Value 1"
) else (
    echo Remote Desktop is disabled. Enabling...
    powershell.exe -Command "Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' -Name 'fDenyTSConnections' -Value 0"
)

Save the file by choosing File > Save As from Notepad’s menu bar.

File > Save As highlighted in Notepad.


Select your desktop as the preferred location to save the file. Click the “Save as Type” drop-down menu and choose “All Files.” Select the “File Name” field, type a name for the file, and add .bat as the file extension. Then, click “Save.”

Saving the batch script to disable Remote Desktop.

To use the file, right-click the file and choose “Run as Administrator.”

'Run as Administrator' highlighted for the batch script to disable Remote Desktop.


And that’s how you toggle off Remote Desktop when you aren’t using it. It’s easy to turn Remote Desktop back on in Windows 11, and you even have third-party tools for Windows and Mac remote connections. Enjoy!

Leave a Comment