Remote Desktop Server Farms and Load Balancing-Part 1 | AskME4Tech

Setup Remote Desktop Server

Faq / September 28, 2019

Credit: ShutterstockLearn how to enable Remote Desktop Protocol (RDP) sessions in Windows Server 2016 to administrate server PCs from anywhere.

Remote Desktop Protocol (RDP) is a Microsoft-proprietary remote access protocol that is used by Windows systems administrators to manage Windows Server systems remotely. What sets RDP apart from, say, Windows PowerShell or Secure Shell (SSH) remoting is the presence of the full graphical desktop, as shown in Figure 1.

Figure 1. A Remote Desktop session from Windows 10 to Windows Server 2016.MORE: Best Remote Access Software and Solutions

By default, the RDP server component listens for incoming connections on TCP port 3389 by default, although this can be changed by the administrator for security reasons.

To be sure, Microsoft's current push is for admins to reduce their reliance upon RDP and instead (a) deploy Windows Servers in Server Core or Nano mode; and (b) employ Windows PowerShell command-line remote administration instead of RDP.

Microsoft's justification for this advice is two-fold:

  • A GUI layer consumes unnecessary system resources
  • A GUI layer broadens the attack surface of your servers

Regardless, many admins are accustomed to RDP-based remote administration, and seek to do so even in the newly released Windows Server 2016 operating system. Let's learn how to enable RDP in Server 2016 (tl;dr: the process is identical to Windows Server 2012 R2).

Figure 2. Enabling Remote Deskop with Server Manager.Server Manager

Open the Server Manager console, navigate to the Local Server node, and click the Remote Desktop hyperlink as shown in Figure 2.

The Remote Desktop hyperlink is simply a shortcut to the System Properties sheet from the System Control Panel item. Select Allow remote connections to this computer, and optionally enable Allow connections only from computers running Remote Destkop with Network Level Authentication (recommended).

Figure 3. Verifying Remote Desktop Windows Firewall configuration by using Powershell.Windows PowerShell

From a lower-level perspective, incoming RDP connections are enabled on a server through two Registry values and a Windows Firewall rule.
Open an elevated Windows PowerShell session and run the following commands. This first one creates the fDenyTSConnections value and sets it to 0 (off). This makes sense, because we don't want to deny Terminal Services (TS) connections.

Figure 4. Customizing the Remote Desktop Users group membership in Group Policy.New-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -Name 'fDenyTSConnections' -Value 0 -PropertyType dword -Force

The next command creates and enables the UserAuthentication (Network Layer Authentication) value; NLA is a good idea and you should consider enabling it by default on your servers.

New-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp' -Name 'UserAuthentication' -Value 1 -PropertyType dword -Force

The next command enables the predefined "Remote Desktop" Windows Firewall rule. We can then invoke the Get-NetFirewallRule PowerShell cmdlet to verify as shown in Figure 3.