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.
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.
The diagram below shows the scenario for this post. The network consists of one domain controller and one RDS server.

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



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.
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.
The following two tabs change content below.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).
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.
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.
Connecting to RDGW from your local PC
Turn off port 3389 to internet to force traffic to use port 443/RDGW
Additional Notes:
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.
