How to Configure Windows Server 2016 Remote Desktop Licensing

Remote Desktop Licensing (RD Licensing) is a mandatory component of any Remote Desktop Services deployment in Windows Server 2016. Without a properly configured licence server that has been activated and loaded with the appropriate Client Access Licences (CALs), your Remote Desktop Session Host servers will stop accepting client connections after the 120-day grace period expires. This tutorial explains how to install, activate, and manage the RD Licensing role on Windows Server 2016, and how to point your RD Session Host servers to the licence server.

Understanding RDS CAL Types

There are two types of RDS Client Access Licences. An RDS Per User CAL is assigned to a user account and permits that user to connect from any device to any RDSH server covered by the licence server. An RDS Per Device CAL is assigned to a specific client device and permits any user to connect from that device to any RDSH server. Per User licensing is generally preferred in environments where users connect from multiple devices (laptops, home computers, mobile devices), while Per Device licensing suits shared workstations where many users share a small number of computers.

Step 1: Install the Remote Desktop Licensing Role Service

The RD Licensing role service is part of Remote Desktop Services. It can be installed on a dedicated server or co-located on an existing server. Install it using PowerShell:

Install-WindowsFeature -Name RDS-Licensing -IncludeManagementTools

Or via Server Manager: Add Roles and Features > Remote Desktop Services > Remote Desktop Licensing. No restart is required.

Step 2: Activate the Licence Server

Before you can install CALs, the licence server must be activated with Microsoft. Open Remote Desktop Licensing Manager from Administrative Tools or Server Manager > Tools. Right-click your server name in the left pane and select Activate Server. The Activate Server Wizard opens.

Choose your connection method. The Automatic connection option connects directly to Microsoft Clearinghouse over the internet and is the simplest option. If the server has no internet access, choose Web Browser and use the provided URL and Product ID to activate via a web browser on an internet-connected machine. The telephone option is available as a last resort.

Fill in the organisation and contact information when prompted (these fields are mandatory but do not affect functionality). After activation, the wizard will offer to start the Install Licences Wizard immediately; proceed to the next step.

wmic /namespace:\rootCIMV2TerminalServices PATH Win32_TSLicenseServer CALL ActivateLicenseServer

Step 3: Install RDS CALs on the Licence Server

After server activation, install your purchased RDS CALs. In RD Licensing Manager, right-click the server and select Install Licences. The Install Licences Wizard opens. Select the licence program that matches how you purchased your CALs: Open License, Retail, Enterprise Agreement, Select License, and so on. Enter the agreement or authorisation number provided when you purchased the licences. Enter the licence code or product key. Select the CAL type (Windows Server 2016 Remote Desktop Services) and the quantity. Click Next and then Finish.

Alternatively, for Per User CALs, you can install them using PowerShell with the appropriate agreement number and product key:

$licServer = New-Object -ComObject "TermServLicensing.TermServLicensingClass"
$licServer.ActivateLicenseServer()

Step 4: Verify Licence Server Status

Once activated and loaded with CALs, the licence server should display a green icon in RD Licensing Manager with the status Activated. Expand the server node to see the installed licences, their type, total quantity, and how many have been issued.

Check the licence server status via PowerShell:

Get-WmiObject -Namespace rootCIMV2TerminalServices -Class Win32_TSLicenseServer | Select-Object ActivationStatus, ServerName

Step 5: Configure RDSH Servers to Use the Licence Server

Each RD Session Host must be directed to use your RD Licensing server. This is most reliably done via Group Policy. Open Group Policy Management (gpmc.msc) and create or edit a GPO linked to the OU containing your RDSH servers. Navigate to:

Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing

Enable the policy Use the specified Remote Desktop license servers and enter the FQDN or IP address of your licence server. Enable the policy Set the Remote Desktop licensing mode and set it to Per User or Per Device to match your CAL type. Apply the GPO and force a group policy update on the RDSH servers:

Invoke-Command -ComputerName "rdsh01.domain.local" -ScriptBlock { gpupdate /force }

You can also configure the licence server directly on a standalone RDSH (not domain-joined) using the RD Session Host Configuration tool or registry:

Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesTermServiceParametersLicenseServers" -Name DefaultLicenseServer -Value "rdlicensing.domain.local"
Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetControlTerminal ServerRCMLicensing Core" -Name LicensingMode -Value 4

LicensingMode 2 = Per Device, 4 = Per User.

Step 6: Add the Licence Server to RDS Deployment (Full RDS)

If you are running a full RDS deployment managed through Server Manager, add the licence server to the deployment configuration. In Server Manager > Remote Desktop Services > Overview, under Deployment Overview, click the Tasks menu next to RD Licensing and select Add RD Licensing servers. Select your licence server from the list and click Add. Set the licensing mode for the deployment here as well.

Step 7: Monitor CAL Usage

Track CAL consumption regularly to avoid running out of licences. In RD Licensing Manager, right-click the server and select Create Report > CAL Usage. The report shows issued CALs, available CALs, and temporary CALs. Temporary CALs are issued when the licence server runs out of permanent CALs and expire after 89 days.

Get-WmiObject -Namespace rootCIMV2TerminalServices -Class Win32_TSIssuedLicense | Select-Object LicenseID, sIssuedToUser, sIssuedToMachine, ExpirationDate

Troubleshooting Common Issues

If RDSH users receive a warning that the licence server cannot be reached or that the grace period has expired, check network connectivity between the RDSH server and the licence server on TCP port 135 (RPC). Verify the Group Policy is applied correctly using gpresult /R on the RDSH server. Check the System event log on the RDSH for Event ID 1128 (RD Licensing) errors. Ensure the RD Licensing service is running on the licence server.

Get-Service -Name TermServLicensing | Select-Object Name, Status, StartType
Test-NetConnection -ComputerName "rdlicensing.domain.local" -Port 135

Properly configured RD Licensing ensures compliance with Microsoft licensing agreements and uninterrupted access for your RDS users. Maintain adequate CAL inventory and monitor usage proactively to avoid licence exhaustion during peak usage periods.