Best Way to Enable Remote Desktop in Windows Server 2016

Posted on

Best Way to Enable Remote Desktop in Windows Server 2016

Best Way to Enable Remote Desktop in Windows Server 2016

In this article, we want to teach you How To Enable Remote Desktop in Windows Server 2016. The Microsoft Remote desktop app is a technology that allows users to connect to a specific computer from a remote location as if they were sitting in front of it.

Also, when the connection is established, users can perform many tasks like they are using the computer in person. They can manage apps, fix issues, and perform administrative tasks.

Now proceed to the following steps provided by the Orcacore website to Enable Remote Desktop in Windows Server 2016.

By default, the remote desktop is disabled in Windows Server 2016. In this article, you learn to turn on and enable remote desktop protocol (RDP).

Let’s see how to Enable Remote Desktop in Windows Server 2016.

Tips: This guide on Allow Remote Desktop Connection Windows Server 2022, will help you to enable RDP in the latest versions of Windows Server.

Allow Remote Desktop in Windows Server 2016

At this point, you need to enable the remote desktop by following these steps.

By default, the server manager will open when you log in to the GUI. If this does not happen, you can select it by typing server manager from the search icon in the taskbar.

Then, open the server manager.

In the server manager window, select the local server that is on the left side. you will see that the remote desktop is disabled.

Enable Remote Desktop in Windows server 2016

Now click on the disabled text to open the remote desktop properties. In the properties window, select “Allow remote connections to this Computer” like the image below:

remote desktop properties

Note: Also, you can open the system properties window by entering the “SystemPropertiesRemote” into a command prompt or PowerShell terminal.

Or, you can use the win+R key and then type “sysdm.cpl” to open the system properties window.

When you select the “Allow remote connections to this Computer” you will see a warning message that tells you to enable the remote desktop connections for selected network connections. Press OK to continue.

Note: If you want to add a specific user or group to have permission to connect via remote desktop, you can click “select users” and then define them there.

Press ok to close the system properties window.

Back into the server manager, then refresh the view to see if the remote desktop is enabled.

server manager on windows server 2016

Now the remote desktop is ready to use.

Conclusion

At this point, you have learned to enable remote desktop on Windows Server 2016. Also, for more security, you can select specific users and groups to access the remote desktop.

Hope you enjoy it. Also, you may like to read the following articles:

NoMachine Remote Desktop Setup on Windows 10 / 11

Connect Remote Desktop Without a Password in Windows

Enable Remote Desktop on Windows

FAQs

What is Remote Desktop, and why enable it in Windows Server 2016?

Remote Desktop allows administrators and users to connect to a server remotely over a network or the internet to access the desktop interface and applications of the server. This is useful for remote management, troubleshooting, and maintaining the server without needing physical access.

What permissions are required to use Remote Desktop?

Only users in the Administrators group or users added to the Remote Desktop Users group can connect using Remote Desktop. You can add users to the Remote Desktop Users group by following the below path:
Opening System Properties > Remote settings > Select Users > Add

Alternative Methods to Enable Remote Desktop in Windows Server 2016

While the graphical user interface (GUI) method outlined above is straightforward, there are alternative ways to enable Remote Desktop in Windows Server 2016 that can be useful in different scenarios, such as when a GUI is unavailable or when automating server configuration. These methods involve using the command line or PowerShell. Let’s explore two such alternatives to enable remote desktop on Windows Server 2016.

Method 1: Enabling Remote Desktop via Command Line (CMD)

The command line offers a quick and efficient way to enable Remote Desktop, especially when dealing with multiple servers or when scripting configurations. This method involves using the netsh command, a powerful tool for configuring network settings.

  1. Open Command Prompt as Administrator: Search for "cmd" in the taskbar, right-click on "Command Prompt," and select "Run as administrator."

  2. Execute the netsh command: Type the following command and press Enter:

netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes

This command modifies the Windows Firewall to allow incoming Remote Desktop connections. It targets the "Remote Desktop" rule group, which encompasses all the necessary firewall rules for RDP.

  1. Configure RDP Service (Optional but Recommended): To ensure the Remote Desktop service starts automatically, use the following commands:
reg add "HKLMSYSTEMCurrentControlSetControlTerminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
net start "Remote Desktop Services"

The first command modifies the registry to allow terminal server connections (which includes Remote Desktop). The /v specifies the value name, /t specifies the data type, /d specifies the data, and /f forces the operation without prompting. The second command starts the "Remote Desktop Services" service.

Explanation:

The netsh command provides a direct way to modify firewall rules. The registry modification ensures that RDP is enabled at the system level, and starting the service makes it immediately available.

Method 2: Enabling Remote Desktop via PowerShell

PowerShell offers a more robust and flexible way to manage Windows Server, including enabling Remote Desktop. It allows for more complex scripting and automation.

  1. Open PowerShell as Administrator: Search for "PowerShell" in the taskbar, right-click on "Windows PowerShell," and select "Run as administrator."

  2. Execute the PowerShell commands: Type the following commands and press Enter after each:

Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name "fDenyTSConnections" -Value 0
Start-Service "Remote Desktop Services"

Explanation:

  • Enable-NetFirewallRule -DisplayGroup "Remote Desktop": This PowerShell cmdlet enables the firewall rules associated with Remote Desktop. It’s equivalent to the netsh command in the previous method but uses a more PowerShell-native approach.

  • Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name "fDenyTSConnections" -Value 0: This cmdlet modifies the same registry key as the reg add command in the command-line method, setting the fDenyTSConnections value to 0 to allow Remote Desktop connections. PowerShell offers a more readable and consistent way to interact with the registry.

  • Start-Service "Remote Desktop Services": This cmdlet starts the Remote Desktop Services, making RDP immediately available.

Code Example: Combining into a Single Script

For easier deployment and automation, you can combine these PowerShell commands into a single script:

# Enable Remote Desktop

try {
    Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
    Write-Host "Firewall rule enabled for Remote Desktop." -ForegroundColor Green

    Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name "fDenyTSConnections" -Value 0
    Write-Host "Remote Desktop enabled in the registry." -ForegroundColor Green

    Start-Service "Remote Desktop Services"
    Write-Host "Remote Desktop Services started." -ForegroundColor Green

    Write-Host "Remote Desktop has been successfully enabled." -ForegroundColor Green

} catch {
    Write-Host "An error occurred while enabling Remote Desktop:" -ForegroundColor Red
    Write-Host $_.Exception.Message -ForegroundColor Red
}

This script includes error handling using a try-catch block to gracefully handle any potential issues during the process. It also provides informative output to the console, indicating the progress and status of each step.

Choosing the Right Method

The best method for enabling Remote Desktop depends on your specific needs and preferences. The GUI method is suitable for simple, one-off configurations. The command-line method is useful for quick tasks and when a GUI is not available. PowerShell provides the most flexibility and is ideal for scripting and automation.

Remember to always consider security best practices when enabling Remote Desktop, such as using strong passwords, enabling Network Level Authentication (NLA), and restricting access to authorized users only. By understanding these alternative methods, you can effectively enable remote desktop on Windows Server 2016 in various scenarios and streamline your server management tasks.

Leave a Reply

Your email address will not be published. Required fields are marked *