The Remote Desktop Gateway RDG role enables you to access your RDS environment remotely over 443. RDS Architecture. VBoring Blog Series: Setup Remote Desktop Services in Windows Server 2012 R2; Setup RD Licensing Role on Windows Server 2012 R2; Setup RD Gateway Role on Windows Server 2012 R2; Install the RD Gateway Role.


  • Install the Licensing Server From within the Server Manager application, add a server to manage what will become a licensing server. Navigate to Remote Desktop Services and click on the green plus sign for RD Licensing. From there, add the other server on the Add RD Licensing Servers screen.
  • Install the client. Choose the client that matches the version of Windows. The new Remote Desktop client (MSRDC) supports Windows 10, Windows 10 IoT Enterprise, and Windows 7 client devices.
  • Next we need to install our RDS licenses. From the server manager select Tools then ‘Remote desktop services’ then click ‘Remote Desktop Licensing Manager’. First thing we do in the licensing manager is right click the server node and click ‘Activate Server’. Click Next on the wizard. Select ‘Automatic Connection’ and press Next.

Remote Desktop Services (RDS) in Windows Server 2012 is Microsoft’s VDI (Virtual Desktop Infrastructure) offering. RDS formerly known as Terminal Services (TS) provides session-based virtual desktops, virtual-machine based virtual desktops and applications to end users. To be able to use these features, you must install Remote Desktop Services in Windows Server 2012 or 2012 R2. So, in this post I will show steps to install Remote Desktop Services in Windows Server 2012.

Install Remote Desktop Services in Windows Server 2012

The diagram below shows the scenario for this post. The network consists of one domain controller and one RDS server.

Desktop

Log on to RDS server (MBG-RDS01). Open Server Manager. Click Add Roles and Features.

Install Remote Desktop ServicesInstall remote desktop services manager

Remote

Uninstall Remote Desktop Windows 10

Click Next on Before you begin page. Choose installation type as Remote Desktop Services installation. Click Next. Euchre forever full.

As you can see below there are two ways of installing RDS services in Server 2012. They are quick or standard. In quick deployment option, three of the required RDS services are installed on single server. The three services are, RD Session Host, RD Connection Broker and RD Web Access. Similarly, the quick installation also creates a collection and publishes some RemoteApp programs. Here, I will install quick deployment option. If you wish to separate each RDS components then you can choose standard deployment option. Choose Quick Start as Deployment Type and click Next.

Deployment Scenario can also be either virtual machine-based or session-based. Here, I will choose session-based. Click Next.

Under Server Selection page, the current server will be automatically added as shown below. Click Next.

Review the installation options. Check, Restart the destination server automatically if required option. Click Deploy.

The installation will now begin. The server will reboot automatically. After the reboot, log back in, you can see the installation has completed successfully. Click Close.

Now, let’s verify the installation. Open Server Manager. Click Remote Desktop Services on the left pane. You can see the RDS deployment Overview as shown below. As we can see, RD Web Access, RD Connection Broker and RD Session Host have been installed. If you want applications or desktop sessions to be accessed from the Internet then you have to install RD Gateway. Similarly, You must install RD Licensing to activate RDS server.

You can also view installed applications. Under Collections, click QuckSessionCollection which is just a collection named created by Quick Deployment installation option. As you can see, calculator, paint and wordpad applications have been published.

To access those applications, open web browser and type URL of RD Web Access server. Type username and password and log on the server as shown below. You can also customize the look of RD Web Access page.

Install Remote Desktop Services Server 2019 Powershell

You can view the published applications below. Double-click to open any application. I have double-clicked calculator.

Accept the certificate warning. The application will open as shown below.

So in this way you can install RDS in Windows Server 2012 using Quick Deployment option. You can now install certificates, publish required apps, publish session-based desktops, customize RD Web Access, and so on.

You may also like -

Install remote desktop services managerThe following two tabs change content below.
Bipin is a freelance Network and System Engineer with expertise on Cisco, Juniper, Microsoft, VMware, and other technologies. You can hire him on UpWork. Bipin enjoys writing articles and tutorials related to Network technologies. Some of his certifications are, MCSE:Messaging, JNCIP-SEC, JNCIS-ENT, and others.
  • Install Exchange 2019 in Windows Server 2019 - November 28, 2020
  • Why Backup your Microsoft Office 365 - November 27, 2020
  • What’s New in VMware vSphere 7 - September 18, 2020

Installing the Remote Desktop Gateway Role (RDGW) on Windows Server 2019 to force RDP over HTTPS (port 443) instead of port 3389.

Installing Remote Desktop Gateway (RDGW) Role on Windows Server 2019

In this example, we had already installed the RD Session Host (RDSH) and RD License Server roles previously on the server. This server is in workgroup mode and not joined to a domain. Steps below are used to install the RDGW role on a single server (installing RDGW also installs IIS) so all three roles (RDSH, RDlic, RDGW) are installed on the same server. If you are already licensing RDS with RDS user licenses, there is no additional cost to installing the RD Gateway Role (other than if you purchase a trusted SSL certificate).

  1. Go to Server manager, add roles & features, role-based or feature-based installation, select existing server, in Server roles expand Remote Desktop Services and select Remote Desktop Gateway, click through everything else as defaults. It will take about 5 minutes to install. Although it won’t force a reboot, it is typically a good idea to reboot the server after this step.

Install Remote Desktop Services Server 2012

2. Next go to Server Manager, Remote Desktop Services, Servers, click on server name and right click into properties and to “RD Gateway Manager”. (note: in RDS, Overview, you will see a message about needing to be logged in as domain user to manage servers and collections – to have this functionality you need to be connected to a domain instead of in workgroup mode, we are proceeding with workgroup mode only below).

3. In RD Gateway Manager, expand tree and go to policies. Create a “Connection Authorization Policy” (CAP) for which users can login to the gateway and a “Resource Authorization Policy” (RAP) for what resources can be accessed. For example, we created policies called CAP1 and RAP1 and used defaults for most everything. For CAP1, you probably want to add Remote Desktop Users and Administrators to “user group membership”. For RAP1, under Network Resource, you should change selection to “allow users to connect to any resource” since this is a single server setup. You can modify these policies later to be more specific and restrictive.

4. For SSL cert (go back to RD Gateway Manager, Properties), create a self-signed cert by going to properties, SSL tab, create self-signed cert, click on “create and import certificate”, change certificate name to the IP address “xxx.xx.xxx.xx” of the server in the certificate name field. Copy the self-signed cert to your local PC because you will need it in order to login through the gateway (all users will need it). If you use a trusted SSL cert from CA then you won’t need to install self-signed cert on each local PC/client like you will with a self signed certificate. Take note of the self-signed certificate expiration date which should be in 6 months – if you decide to continue to use a self-signed certificate, you will need to generate a new cert before the expiration date.

Note: using a self-signed certificate will require you to install the certificate on each client device. It is recommended to use a trusted cert (instead of self-signed cert) where you would need to purchase the SSL cert from a company like GoDaddy and it will be in the name of a URL/domain instead of IP address.

Tabc bartender

Install Remote Desktop Services Remotely

5. At this point, all items in RD Gateway Manager status should be showing as green / green check marks.

6. Go to Services and change the Remote Desktop Gateway Service (service name is TSGateway) to be startup type “automatic” instead of “automatic (delayed)” and make sure it is started/running. This will allow gateway service to start quicker upon a server reboot otherwise you may get a message that the gateway service is unavailable when trying to log in until you wait several minutes for the service to start.

Install Remote Desktop Services

Connecting to RDGW from your local PC

  1. 7Open the Remote Desktop Connection client on your local PC and expand all field by clicking show options.
  2. On the general tab, make sure computer name field is the IP address of the server. You will be entering the IP address on both the General tab and the Advanced tab using the same IP address since the RDSH server and the RDGW server are the same server in this example.
  3. Before connecting, going to the Advanced tab
  4. Click on Settings box under Connect from Anywhere
  5. Select “use these gateway settings”
  6. Enter IP address of the server for Server Name
  7. Uncheck the box to “Bypass RD gateway server for local addresses”
  8. Check the box to use same credentials for RD gateway server and remote computer since same server in this example
  9. Press OK, go back to local resources tab and select what local devices should be redirected (typically printers and clipboard should be redirected, but not local drives under the more button – redirecting local drives uses bandwidth/resources so only do it when needed)
  10. Go to general tab, decide if you want credentials to be allowed to be saved, and save the customized rdp file as a shortcut on your desktop by clicking “save as” and give it a useful name.
  11. When you connect, you may first get a warning message that says “The publisher of this remote connection can’t be identified. Do you want to connect anyway? OR “the identity of the remote computer cannot be verified. Do you want to connect anyway?” You can click the box to “don’t ask me again for connections to this computer” if you don’t want to see this message every time, and continue. This message typically happens because you are using a rdp shortcut on your local desktop that you customized or because you are using a self-signed certificate.
  12. Connect and you will get a message to enter your credentials which will be used for both RDSH and RDGW, select whether to remember credentials or not.
  13. If you try to connect and you get a message “This computer can’t verify the identity of the RD Gateway XXXXX….” and it won’t connect, it is because you are using a self-signed certificate and haven’t put a copy of the certificate in your trusted root certificate authorities on your local PC. So go back on the server and copy the cert from the usersusernamedocumentscertname.cer folder of server to you local PC/desktop, then double click it on your local PC, select “install certificate” and select “Local Machine” store location and select this specific location “Trusted Root Certificate Authorities” (don’t do automatic location). THIS WILL HAVE TO BE DONE ON ALL LOCAL PCs TO CONNECT WHEN USING SELF-SIGNED CERTS.
  14. If you are have trouble logging in, try typing username as servernameusername so WIN-XXXXXXAdministrator or ServerXDan etc.

Turn off port 3389 to internet to force traffic to use port 443/RDGW

  1. Next, turn off the four inbound Windows firewall rules for Remote Desktop for port 3389 FOR PUBLIC PROFILE (Remote Desktop – User Mode (TCP-In) and (UDP-In) and Remote Desktop Services – User Mode (TCP-In) and (UDP-In). Click into the firewall rule, go to the advanced tab, and uncheck the “Public” box so the rule doesn’t apply to the public profile.
  2. RDP Traffic then should go over port 443 from the outside to the server and then 3389 internal to the server. You can test this by trying to login via RDP without Gateway settings.
  3. You can modify/disable other Remote Desktop inbound firewall rules if needed too.

Additional Notes:

How To Install Terminal Services

See different post on how to purchase and install a SSL certificate from a trusted CA. http://www.riptidehosting.com/blog/purchasing-and-installing-a-trusted-ssl-certificate-to-use-for-rdgw-rdsh/ Egistec es603 windows hello.