The Remote Desktop Licensing server is used to issue and track RDS client terminal access licenses (CALs). Microsoft’s licensing policy requires all users or devices connecting to desktop sessions on RDS to be licensed. In this article, we’ll look at how to install and activate the Remote Desktop Licensing server role on a host running Windows Server 2022, 2019 or 2016, and how to install RDS CALs.
The Remote Desktop Licensing feature can be installed on any Windows Server host. It is not necessary to install it on one of the servers in the RDS farm. If you are deploying an RD Licensing host in an AD domain, add the server to the built-in Terminal Server License Servers group (otherwise, the host will not be able to issue RDS Per User CALs to domain users).
By listing the members of this group, you can quickly find all hosts with RDS licenses in the domain.
Install the Remote Desktop Licensing service from the Server Manager console (Add Roles and Features -> Remote Desktop Services -> Remote Desktop Licensing).
Wait for the role to be installed.
On Windows Server, you can also use PowerShell to install the RDS Licensing service and the RD Licensing management tools.
Install-WindowsFeature RDS-Licensing –IncludeAllSubFeature -IncludeManagementTools
List the RDS features installed on the server and check that RDS-Licensing and RDS-Licensing-UI are installed:
Get-WindowsFeature -Name RDS* | Where installed
Two MMC consoles are used to manage the RDS Licensing service.
To issue licenses to RDP clients, your RDS License Server must be activated. Open the Remote Desktop Licensing Manager ( licmgr.exe ), right-click the name of your server, and select Activate Server.
In the RDS licensing server activation wizard, choose whether you want to activate the server over the Internet, using a browser, or by phone.
Next, fill in some information about your company (some fields are required).
Click the Finish button. The following message should appear:
The license server has been successfully activated.
Click on the server name in the console and select Review Configuration. In this example, the RD license server is enabled and can issue licenses to clients in the AD domain.
This license server is a member of the Terminal Server License Servers group in Active Directory. This license server will be able to issue RDS Per User CALs to users in the domain, and you will be able to track the usage of RDS Per User CALs.
This license server is registered as a service connection point (SCP) in Active Directory Domain Services.
Now you need to install the terminal client access license (RDS CAL) pack you have purchased on the license Server. There are two types of RDS CALs:
If you are deploying an RD host in a workgroup (without an AD domain), use Per Device RDS CALs. Otherwise, the RDSH server will forcibly terminate the user session every 60 minutes:
Remote Desktop License Issue: There is a problem with your Remote Desktop license, and your session will be disconnected in 60 minutes
The RDS CALs you use must be compatible with the version of Windows Server that the users or devices are connecting to. To determine the compatibility of RDS CAL with versions of Windows Server on the RD license server, please refer to the following table:
2008 R2 CAL | 2012 CAL | 2016 CAL | 2019 CAL | 2022 CAL | |
2008 R2 | Yes | No | No | No | No |
2012 | Yes | Yes | No | No | No |
2012 R2 | Yes | Yes | No | No | No |
2016 | Yes | Yes | Yes | No | No |
2019 | Yes | Yes | Yes | Yes | No |
2022 | Yes | Yes | Yes | Yes | Yes |
RDS CALs for new versions of Windows Server cannot be installed on previous versions of WS. For example, you won’t be able to install the 2022 RDS CALs on a Windows Server 2016 licensing host. An error occurs when trying to install new RDS CALs on an older version of Windows Server:
RD Licensing Manager The license code is not recognized. Ensure that you have entered the correct license code.
Right-click your host in the Remote Desktop Licensing Manager console and select Install Licenses.
Select the activation method (automatic, online, or by phone) and the license program (in our case, it is Enterprise Agreement).
Several RDS enterprise agreement numbers have been leaked on the internet (4965437), you don’t even need to look for rds cracks or activators.
The next steps of the wizard depend on which license program you have selected. In the case of an Enterprise Agreement, you must provide its number. If you have chosen License Pack (Retail Purchase), enter the 25-character product key that you received from Microsoft or a partner.
Specify the product version (Windows Server 2022, 2019, or 2016), the RDS CAL type, and the number of terminal licenses to be installed on the server.
You can convert RDS User CALs to Device CALs (and vice versa) using the Convert Licenses option in the RD Licensing Manager console.
Users can use the RDSH role for a grace period of 120 days after it is installed on Windows Server, after which they won’t be able to connect to RDS. For your RDSH host to receive CALs and issue them to devices/users, you must specify the address of the RD licenses server in the RD Session Host settings.
To change the name/address of the licensing server on the RDS host, open Server Manager -> Remote Desktop Services -> Collections. In the upper right menu “Tasks” select “Edit Deployment Properties”.
Go to the RD Licensing tab, select the licensing type (Per user or Per device depending on the CALs you have), and license server address. Click Add -> OK.
If the licensing type is not set on the RDSH server, you will receive the error “Licensing mode for the Remote Desktop Session Host is not configured”.
The RDS licensing server settings on the RDS host can be set using Group Policy. You can create a new domain GPO using the GPMC console and assign it to the OU with RDS hosts. Or you can use the local Group Policy Editor to set the address of the RDS license server. Or use the local Group Policy Editor ( gpedit.msc ) to set the RDS licensee server address.
Go to Computer Configuration -> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing and configure the following options:
If you have installed RDSH on the Windows Server Evaluation edition, you must convert it to the full version according to this guide. Without an upgrade, RDSH services on such a host will only work for 120 days, even if you target it to an activated RDS license server.
You can also use PowerShell to set the RDS licensing server name and CAL type. If you have RDS Connection Broker deployed, you can change your licensing settings using the command:
Set-RDLicenseConfiguration -LicenseServer @("rds-lic01.woshub.loc") -Mode PerDevice -ConnectionBroker "rdcb01.woshub.loc"
Or you can specify the licensing server address and license type directly in the registry using PowerShell:
# RDS licensing type: 2 – Per Device CAL, 4 – Per User CAL
$RDSCALMode = 4
# RDS license server name
$RDSlicServer = "rds-lic01.woshub.loc"
New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers"
New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" -Name SpecifiedLicenseServers -Value $RDSlicServer -PropertyType "MultiString"
Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\" -Name "LicensingMode" -Value $RDSCALMode
RDS hosts connect to the RDS Licensing Server using the following ports to obtain client licenses. Make sure they are not blocked by firewalls (or Windows Defender Firewall):
To check port availability, use the Test-NetConnection cmdlet or the PortQry tool.
Run the Remote Desktop Licensing Diagnoser ( lsdiag.msc ) on the RDSH and check that it sees the licensing server and the number of RDS CALs available.
If there are no warnings, and you see the message, then the RDSH server can successfully receive RDS CALs for remote users and/or devices.
RD Licensing Diagnoser did not identify any licensing problems for the Remote Desktop Session Host server.
The following warnings are displayed in the Licensing Diagnoser console if the RDS license server is not configured or is unavailable:
Licenses are not available for this Remoter Desktop Session Host server, and RD Licensing Diagnose has identified licensing problems for the RDSH.
Number of licenses available for clients: 0
The licensing mode for the Remote Desktop Session Host server is not configured.
Remote Desktop Session Host server is within its grace period, but the RD Session Host server has not been configured with any license server.
The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
The solution is to remove the L$RTMTIMEBOMB key from the registry on the RDSH server.
Connect to the RDSH server from the client and check that the licensing server has issued an RDS CAL. Open the Event Viewer console and navigate to Applications and Services Logs -> Microsoft -> Windows -> TerminalServices-Licensing -> Operational. Event ID 82 should contain the following description for a successfully issued RDS CAL.
The "Temporary" Windows Server 2022 : RDS Per Device CAL belonging to computer "DESKTOP-PCNAME1" has been upgraded to "Permanent" Windows Server 2022 : RDS Per Device CAL.
Let’s have a look at several typical administrator tasks in the management of RDS CAL on a licensing server.
A report of RDS CAL license usage can be obtained from the RD Licensing Manager console. Right-click server and select Create Report -> CAL Usage.
View information on installed and used RDS CALs using PowerShell:
Get-WmiObject Win32_TSLicenseKeyPack|select-object KeyPackId,ProductVersion,TypeAndModel,AvailableLicenses,IssuedLicenses |ft
If you are running out of free client licenses, you can revoke a previously issued RDS Device CAL for an inactive computer from the console (Right-click on the license and select Revoke License).
You can also use a PowerShell script to revoke a previously issued RDS device CAL:
$RevokedPCName=”lon-bc1-123”
$licensepacks = Get-WmiObject win32_tslicensekeypack | where <($_.keypacktype -ne 0) -and ($_.keypacktype -ne 4) -and ($_.keypacktype -ne 6)>
$licensepacks.TotalLicenses
$TSLicensesAssigned = gwmi win32_tsissuedlicense | where
$RevokePC = $TSLicensesAssigned | ? sIssuedToComputer -EQ $RevokedPCName
$RevokePC.Revoke()