How to Enable & Disable Remote Desktop Protocol (RDP) on Windows Cloud Servers

2020-05-21 By Ryan 73737 Views windows RDP networking
33 reviews

RDP (Remote Desktop Protocol) is the protocol that allows a user to connect to a Windows Server through a graphical interface over any network.


rdpdiagram


This guide will describe the steps to enable and disable Remote Desktop service in the Windows server through the graphical interface as well as Windows Powershell.




Enable RDP through graphical interface



  1. Click on Start Menu button and then on Server Manager.

    windowsrdp1

  2. In the Server Manager window, click on Local Server in the left side panel and wait for few minutes for the server status to get refreshed. The Remote Desktop option will be shown as Disabled in Windows 2019 version.

    windowsrdp2

  3. Click on the Disabled option and this will open up the Remote tab in the System Properties window.

    windowsrdp3

    NOTE: The System Properties window can also be accessed from Control Panel option by clicking on System and then on Remote settings in the left panel or from the Windows command prompt by executing the below command.

    > SystemPropertiesRemote
    

    windowsrdp4

    windowsrdp5

  4. From under Remote Desktop section, select the option Allow remote connections to this computer.

    The sub-option Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended) can be left enabled or disabled, depending upon the machines from which Remote Desktop connection is being established to the server. If the local machine is Linux-based, then this option needs to be disabled.

    windowsrdp6

  5. Once this option Allow remote connections to this computer is selected, a warning message window will appear notifying the user that the required firewall rules will be enabled in the server for allowing Remote connections to the server from any source network. Click on OK to proceed.

    windowsrdp7

  6. Click on OK in the System Properties window to complete the process of enabling Remote Desktop in the server.

  7. The status of the Remote Desktop service can now be confirmed back from Server Manager, where it will show as Enabled once the Server Manager is refreshed.

    windowsrdp8




Enable RDP through Windows Powershell



  1. The registry value that enables/disables Remote Desktop can be modified using the Set-ItemProperty cmdlet.

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

    windowsrdp9

  2. Once this is completed, the Enable-NetFirewallRule cmdlet can be used to set the Windows firewall to allow remote desktop connections.

    > Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
    

    windowsrdp10




Testing allowed Remote Desktop connection service

Once Remote Desktop is enabled in the server, remote connections to the server can be tested using the Remote Desktop Connection app (Windows) or the rdesktop command (Linux).


Windows:


  1. Click on Start Menu option and search for Remote Desktop Connection and click on the application.

  2. Type in the IP address of the server that needs to be connected to remotely in the Computer field and then click on Connect.

    If the server has any custom RDP port, then the IP needs to be typed in the below format (replace 123.123.123.123 with the exact server IP address and 1234 with the custom port number).

    123.123.123.123:1234
    

    windowsrdp11

  3. Type in the username and associated password with which the server is to be accessed remotely in the Windows Security window and then click on OK to connect to the server remotely.

    windowsrdp12


Linux:

In all Linux distributions, the most common command that can be used to connect to the remote desktop of a server is rdesktop. Another command that can be used is xfreerdp.


  1. Type in the below command in the Linux command line to remotely connect to a server with the rdesktop command (replace 123.123.123.123 with the exact IP address of the server).

    # rdesktop 123.123.123.123
    
  2. Once the command is entered, a remote desktop connection window will appear, in which the username and associated password are to be entered to access the server remotely.

    windowsrdp13




Disable RDP through graphical interface



  1. Access the server and Click on Start Menu button and then on Server Manager.

    windowsrdp1

  2. In the Server Manager window, click on Local Server in the left side panel and wait for few minutes for the server status to get refreshed. The Remote Desktop option will be shown as Enabled.

    windowsrdp14

  3. Click on the Enabled option and this will open up the Remote tab in the System Properties window.

    windowsrdp19

    NOTE: The System Properties window can also be accessed from Control Panel option by clicking on System and then on Remote settings in the left panel or from Windows command prompt by executing the below command.

    > SystemPropertiesRemote
    

    windowsrdp4

    windowsrdp20

  4. From under Remote Desktop section, select the option Don’t allow remote connections to this computer.

    windowsrdp15

  5. Click on OK to proceed.

  6. The status of the Remote Desktop service can now be confirmed back from Server Manager, where it will show as Disabled once the Server Manager is refreshed.

    windowsrdp16




Disable RDP through Windows PowerShell



  1. The registry value that enables/disables Remote Desktop can be modified using the Set-ItemProperty cmdlet.

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

    windowsrdp17


Testing restricted Remote Desktop connection service

Once Remote Desktop is disabled in the server, remote connections to the server can be tested using the Remote Desktop Connection app.


Windows:


  1. Click on Start Menu option and search for Remote Desktop Connection and click on the application.

  2. Type in the IP address of the server that needs to be connected to remotely in the Computer field and then click on Connect.

    If the server has any custom RDP port, then the IP needs to be typed in the below format (replace 123.123.123.123 with the exact server IP address and 1234 with the custom port number).

    123.123.123.123:1234
    

    windowsrdp11

  3. The warning message will receive as shown below.

    windowsrdp17


Related LayerStack Product


Related Tutorials

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.