How to deploy Remote Desktop Services (RDS) 2019

Installing Remote Desktop Services (RDS) on Windows Server 2019 looks like a lengthy task , but in reality is quite easy. In this article, I will walk you though install these services in a domain environment that requires two servers.

Prerequisites

  • Minimum 2 servers or VM (on same domain network)
  • SQL Server installation Media (Express will also work)
  • Certificate (optional)

Software Required

  • Server 2019 ISO
  • SQL Server Installation Media (Express / Standard)
  • SSL Certificate

I will be using wmware esxi hosts and I have prepared 2 servers:

Virtual MachineHostnameRole installed on it
Mushaaf – LABDCLABDCDomain Controller
Mushaaf – RDSH01Mushaaf-RDSH01RD Connection Broker
RD Web Access
RD Session Host

Let’s Start!

Installing the Remote Desktop Services Roles

Log on to the Domain Controller, and in Server Manager right-click the All Servers node and add the second server using the Add Servers command (or select the All Servers node, click Manage and click Add Servers).

Now that all servers needed in this deployment scenario are present, click Manage, and click Add Roles & Features.

Select Remote Desktop Services installation.
Click Next.

Select Deployment Type

Although Quick Start might be a valid option for a single server deployment, leave the default selected. This will explain the steps necessary to install Remote Desktop Services in greater detail.
Click Next.

Select Session-based desktop deployment.
Click Next.

Review Role Services

Review the services that will be installed.
Click Next.

Check Install the RD Web Access role on the RD Connection Broker server.
Click Next.

Check Install the RD Web Access role on the RD Connection Broker server.
Click Next.

Specify RD Session Host server

Click the member server and click the Add button.
Click Next.

Confirm selections

Check Restart the destination server automatically if required.
Click Deploy.

View progress

Wait until all role services are deployed and the member server has restarted.

Click Close.

In Server Manager click Remote Desktop Services and scroll down to the overview.

As you can see the deployment is missing a RD Gateway server and a RD Licensing server.

Click the Add RD Licensing server button.

Select a server

Click the domain controller and click the Add button.
Click Next.

Confirm selections

Click Add.

View progress

Wait until the role service is deployed. No restart is needed.
Click Close.

Click the Add RD Gateway server button.

Select a server

Click the member server and click the Add button.
Click Next.

Name the self-signed SSL certificate

The wizard creates a self-signed certificate. We will deal with certificates in this deployment in a little bit. We will replace the self-signed certificate.

Enter the external Fully Qualified Domain Name which you will also use for the Web Access URL. In my case, for lack of a better name, I used “RDS-IT.Mushaaf.net”. I didn’t want to use “remote.Mushaaf.net” or “desktop.Mushaaf.net” or anything else.
Click Next.

Confirm selections

Click Add.

View progress

Wait until the role service is deployed. Again, no restart is needed.

Notice that “rds-it.mushaaf.net” was configured for the deployment.

Also notice that even more certificate configuring is needed, but we’ll get to that later. Pay no attention to it for now. The same goes for the RD Gateway properties for the deployment. We’ll get to that later.
Click Close.

Review role installation and setting License Mode

Let’s have a quick look at the configuration we have so far.

In Server Manager, Remote Desktop Services, Overview, click Tasks and click Edit Deployment Properties.

Configure the deployment

Review the RD Gateway settings and notice what settings are available.
Click RD Licensing.

Configure the deployment

Notice that an RD License server is available, but no license type is selected yet.

I selected Per User, but since this is just a guide setup, it really doesn’t matter.
Click RD Web Access.

Configure the deployment

By default the RD Web Access IIS application is installed in /RdWeb.
Click Certificates.

Configure the deployment

Notice that the certificate level currently has a status of Not Configured.
As you can see, certificates are used for different goals within the deployment.

The RD Gateway certificate is used for Client to gateway communication and needs to be trusted by the clients. Either install the self-signed certificate on all clients, or use a certificate for which the complete certificate chain is already trusted by all clients. As it said in the wizard, the external FQDN should be on the certificate.

The RD Web Access certificate is used by IIS to provide a server identity to the browser clients.

The RD Connection Broker actually has two goals for which it needs certificates. To enable single sign on (server to server authentication), and for publishing (signing RDP files). If you look in the deployment you’ll see that the Connection Broker is now configured to use “RDS-IT.mushaaf.net”, so we have to change it to use an external FQDN as well.

If we use the same FQDN for all goals described above, we need only 1 certificate, and only 1 external IP address.

We’ll come back to this wizard later to assign the certificate. First order of business is to change the internal FQDN for the Connection Broker to an external FQDN.

Click OK (no reason why we shouldn’t commit the change we made on the licensing tab, remember?)

Changing the Connection Broker FQDN to an externally resolvable FQDN

Open DNS Manager on the domain controller and browse to Forward Lookup Zones.

Right click Forward Lookup Zones and click New Zone… Go through this wizard accepting the defaults until you have to enter a Zone Name.

Enter the external FQDN which will also be used by the Connection Broker.

Finish the rest of the wizard accepting the defaults.

Browse to the newly created zone.

Right click the newly created zone and click New Host (A or AAAA)…

New Host

Leave the Name field blank, but enter the member server’s (holding the RD Connection Broker role) IPv4 address.
Click Add Host.

Now the configuration will be able to resolve “rds-it.mushaaf.net” to the server holding the Connection Broker role, and this will work because “rds-it.mushaaf.net” is also on the certificate that we will configure later.

Create a new Global Security Group called “RD Connection Brokers” and add the computer account for the member server to it as a group member.

We need this group to be able to convert the RD Connection Broker to a highly available RD Connection Broker. You’ll see why we need to do this in a few steps.

Reboot the member server to let it know it’s a member of the RDS Connection Brokers security group.

The next steps in re-configuring the RD Connection Broker depend on an SQL database shared by all Connection Brokers in the deployment. Without this configuration the RD Connection Broker will rely on the Windows Internal Database that was created during the initial deployment of the roles.

Install SQL Express on the Domain Controller (or use an existing SQL Server if you already have one).

It’s not best practice to install SQL onto a Domain Controller, but it’ll do for this guide.

Here’s a list of needed features:

You can also check for Management Tools if you are installing SQL Standard etc

Use the Default Instance

Set the SQL Service to start using SYSTEM because the default account of SQLSERVER cannot be used on a Domain Controller.

When the installation is done open SQL Configuration manager and browse to Client Protocols under SQL Native Client 11.0 Configuration.

Check if TCP/IP is enabled under Client Protocols. SQL install enables this by default, but check it just to be sure, especially if you use an existing SQL Server.

Browse to Protocols for MSSQLSERVER under SQL Server Network Configuration.

Enable TCP/IP. If this is a new SQL installation, this will be disabled by default.
Restart the SQL Server service if you changed this setting.

On the SQL Server, make sure port 1433 is not being blocked by Windows Firewall.

I added the SQL Server executable to the exception list to allow all inbound traffic, but TCP 1433 inbound should suffice.
If you installed SQL Server using the default folder locations, the sqlservr.exe executable is found in “C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Binn”.

Open SQL Server Management Studio, connect to the default instance on the Domain Controller and browse to Logins under Security.

Remember the Management Studio is no longer available with the SQL Server download, but is a different download.
Right click Logins and click New Login…

Login – New

Click Search…

Select User, Service Account, or Group

Click Object Types… and select Group.
Type the RDS Connection Brokers security group name and click Check Names.
Click OK.

Login – New

Click Server Roles and select dbcreator.
Click OK.

We have just effectively granted the RDS Connection Broker server the right to create databases.

We need this because the RDS Connection Broker service will try to migrate from WID (Windows Internal Database to a (high available) SQL Server instance when we convert the Broker to a high available broker.

Install the SQL Native Client on the member server (Client Components only). If you used the member server in this setup to install the SQL Management Studio, you can skip this step because the Native Client was installed with installing the Management Studio.

Everything we need is in place to convert the RD Connection Broker, so let’s do just that.

In Server Manager click Remote Desktop Services and scroll down to the overview.

Right click RD Connection Broker and click Configure High Availability.

Before you begin

So we’re building a single node cluster here 😉
Look at the pre-requisites.

If you have more than one RD Connection Broker they need to be configured using DNS Round Robin.

Click Next.

Configure RD Connection Broker for High Availability

Since we just installed an SQL Server for this, leave the default selected. You’d use the other option for instance if you’d like to use Azure SQL for this deployment.
Click Next.

Configure RD Connection Broker for High Availability

DNS name for the RD Connection Broker cluster:
The DNS Zone name we configured in DNS earlier: rds-it.mushaaf.net

Connection string:
DRIVER=SQL Server Native Client 11.0;SERVER=LABDC;Trusted_Connection=Yes;APP=Remote Desktop Services Connection Broker;DATABASE=MushaafRDCB

Folder to store database files:
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA
I used the instance default folder.

Click Next.

Confirmation

If you get an error before this page:

  • Check if TCP/IP is enabled in client protocols and for your instance
  • Check if you can reach port 1433 on the SQL Server from the member server

Click Configure.

Progress

If you get an error on this page:

  • Check SQL permissions for the security group
  • Check if the database path you entered is correct

Click Close.

The RD Connection Broker is now in High Availability Mode, and configured as “rds.it-worxx.nl” and we are finally ready to complete the configuration.

Configuring Certificates

In Server Manager, Remote Desktop Services, Overview, click Tasks and click Edit Deployment Properties, then click Certificates.

Configure the deployment

You may required SSL certificate here I will create mine free from https://certifytheweb.com/

https://certifytheweb.s3.amazonaws.com/downloads/archive/CertifyTheWebSetup_V5.4.3.exe

Click RD Connection Broker – Enable Single Sign On and click Select Existing certificate.

Browse to the .pfx file, enter its password, and check Allow the certificate..
Click OK.

Click OK to apply the final certificate step.

Configured all servers, configured certificates..

One thing left to do: Tell our RDS environment exactly what to publish.

Publishing resources to your users

In fact you can use this setup to either provide full desktop sessions on the Session Host, or you can choose to publish only applications on the Session Host.

Let’s publish full desktop sessions.

In Server Manager, Remote Desktop Services, Session Collections, click Tasks and click Create Session Collection.

Before you begin

Enter a descriptive name. This name will be displayed under its icon in the Web Access interface.
Click Next.

Specify RD Session Host servers

Click the member server and click the Add button.
Click Next.

Specify user groups

You can limit access to the resource here if you want. Add one or more groups to restrict access to these groups only. In this setup the default selection of Domain Users will do fine. Groups you specify here will be added to the list of groups of users that are allowed to connect using RDP to the Session Host server(s).
Click Next.

Specify user profile disks

User profile disks are not in focus in this guide. Since I have no file shares configured in this setup, uncheck Enable user profile disks for now.
Click Next.

Confirm selections

Review the information and click Create.

View Progress

Wait until the collection is created and the server is added to the collection.
Click Close.

Time to test the setup!

Testing the setup

On a machine that has access to your test setup (you may have to add the external FQDN to your hosts file if you didn’t publish it to the internet) open https://rds-it.mushaaf.net/rdweb

Hey! At least the RD Web Access application works 🙂
Enter a valid username and password (mushaaf\username or username@mushaaf.net).
Create a user for this, or simply use the domain admin account.
Click Sign in.

After logging in you are presented with the full desktop session collection we created.

After clicking the Full Desktop icon you get the warning that devices are going to be redirected.

And when you click Connect, you connect 🙂

Enjoy.

Leave A Comment

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