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.
Install the Remote Desktop Licensing Role on Windows Server
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).
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.
- Remote Desktop Licensing Manager (
licmgr.exe
) - RD Licensing Diagnoser (
lsdiag.msc
)
Activate the Remote Desktop Services License Server
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.
Install RDS Client Access Licenses (CALs) on Windows Server
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:
- Per-Device CAL – it is the permanent license assigned to a computer (device) that connects to the RDS server more than once (a temporary licensee is issued when a device is connected for the first time.) These licenses are not concurrent, so if you have 10 Per-Device licenses, only 10 computers can connect to your RDS host. The current OVL RDS CAL is called:
Win Remote Desktop Services CAL 2022 SLng OLV NL AP DCAL
; - Per-User CAL – the license allows a user to connect to the RDS from any number of computers/devices. This type of license is linked to a user account in Active Directory. It is issued for a period of 52 to 89 days (random number). The current Open Value license of this type is called
Win Remote Desktop Services CAL 2022 SLng OLV NL AP UCAL
.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 |
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).
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.
Configure Licensing Settings on RD Session Hosts
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.
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:
- Use the specified Remote Desktop license servers – specify the name or the IP address of the server where the RDS license is installed;
- Set the Remote Desktop licensing mode – select the license type for RDS CALs.
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
- TCP/135 – Microsoft RPC;
- UDP/137 – NetBIOS Datagram Service;
- UDP/138 – NetBIOS Name Resolution;
- TCP/139 – NetBIOS Session Service;
- TCP/445 – SMB;
- TCP/49152–65535 – RPC dynamic address range
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.
Managing Remote Desktop CALs
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 {$_.licensestatus -eq 2}
$RevokePC = $TSLicensesAssigned | ? sIssuedToComputer -EQ $RevokedPCName
$RevokePC.Revoke()
28 comments
RD Licensing Diagnoser won’t appear until you install the Remote Desktop Session host role.
is it necessary to install ADDS to activate CAL in Windows server 2016 Standard?
I got an internal inquiry, though I am not convinced why they want to know the details (which server). We have a cluster of dual (active/backup) servers, where the authentication licensing is configured on the main then backup servers (WS2016). A group of users(say 10) initiated sessions via remote desktop to the cluster, but none of the servers is showing any licensing authentication (No of licenses is shown as 0 on the dashboard). But sessions/connections are up. The question is how to determine which server is providing which authentication licensing number to which user, and how to visualize that (not sure if authentication license manager can do that)? Initially 50 licenses x 4 groups (i.e. total 200 licenses) were configured on the main then backup servers. It might be confusing and difficult to understand the situation. I hope a professional administrator can advise me and appreciate your early feedback. Thanks.
I don’t understand your architecture … If you have 2 RDSH servers, it would be correct to combine them into one RDS farm. You can use any of these servers or third server (for example, with the RD Connection Broker role) an RDS license server.
Thank you Sooo much… This is great work. Knowledge sharing is very very valuable……
if you configured as “per user” no way to track, if you configured as per device you can find out which server connected and licenses assigned numbers etc.
great article. Really helpful
Many thanks! Helped me Install the license correctly.
Hi, i have a Windows 2016 Server VM hosted on VMware, The 120 day grace period expired so i bought 5 CAL licences as a number of users need to log on to this VM. I followed the above steps. I activated the Licence Server on the VM then proceeded to add the CAL licences on the same server. Every thing looked good on Licence Manager with Licence Server Activated and 5 available CAL User licences. However when i try to remote onto the VM it says “No Remote Licence Servers available to provide a licence”. Also in RD Diagnoser states no licences available / The licensing mode for the remote desktop Host Server is not configured / The Remote Desktop Session Host server is not configured with any licence server. Have I missed something obvious?
Check this post https://woshub.com/licensing-mode-rds-host-not-configured/
Hi,
I used RDS 2019 Per User CAL in a workgroup (not in a domain), and now I have error message ” remote desktop issue”.
Also, I installed license.
Could you please help me?
Should I install ADDS role?
Thanks , I just install my server 2019 RDS User Cal on the server 2019 , and I bought both products on ??? , it is working with your instruction how to install the cals , thank you
This is the best article about RSD and licensing. In other documents the authors always consider/install license service role on the RDS as well. So I was not sure if have to install it while I have a separated License server and I couldn’t find how I can set it (the option for setting a separate license server does not exist in Server manager Tools). This article helped me a lot. Many thanks!
Haven’t all NETBIOS tasks (Ports 137, 138, 139) been accomplished by port 445 since Windows 2000 Server? I don’t want to open up more ports than needed. Is there a special task that these ports are performing that warrants their use?
In current builds of Windows, NETBIOS ports are not used for SMB traffic. But I don’t know for sure if they are used for RDS licensing or not. This port list is taken from Microsoft guidelines.
Try to check if RDS licensing works without open netbios ports.
Hey
Thank you for the description and guidance writing.
In my case, I bought an RDS Cal license for 50 users and all have been assigned. I am having new devices to add adding to those existing 50.
Can it be possible to add an additional RDS license without removing or losing the existing one?
Thanking you in advance for your quick response
RDS Host and RDS licensing servers are in the same domain. tell me how to ADDS server take licenser from RDS Licensing server
You must specify the name/IP address of your RDS Licensing server manually (via GPO, RDS depoyment configuration, or PowerShell).
ADDS does not know where your RDS Lic servers are running.
There is only one Terminal Server License Servers group, in which all hosts with the RDS Licensing role can be listed.
Thank you , I just followed the instructions ,and install the server 2019 RDS Users cal successfully
Thanks for the good explanation. But, what I am wondering after a new installation of the Windows Server 2022 Standard – without activation of RDS CAL yet – that it works currently without issues with several client-server applications.
What I did:
1. Install the Remote Desktop Licensing Role on Windows Server 2022(!)
2. Activated the RDS License Server
3. Installed RDS CALs – per device (as there is no domain)
What I didn’t:
4. Didn’t configure RDS Licenses on RD Session Hosts (the same server)
a) Does it work currently due to grace period (of 120 days)? Can this grace period be monitored?
b) If I check the still available licenses, all of them are still available, none of them has been utilized
Something strange: If I recreate the license DB and restart of licensing service the server is already activated…
Thanks for your feedback(s)!
I think the grace period is being used on your RDSH host. Check the number of days remaining until the end of the RDS grace period with the command:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays
https://woshub.com/the-remote-desktop-session-host-server-does-not-have-a-remote-desktop-license-server-specified/
I am currently using a Server 2019 Licensing Server with installed 2016 CALs.
The Server works fine even on the TS-Server side but it alway shows up the same amount on avail. CALs and used CALs, is there any way to make sure that used calls will show up correct on the RD Licensing Diagnoser?
Licensing Server has been added via GPO.
Thanks
I followed this guide to activate on a Win Server 2019 the RDS License Server and install 2019 CALs.
Strange thing is that CALs are isseud to every user which tries to connect to RemoteApps but only the first connection is accepted and the next are refused with message “The number of connections to this computer is limited and all connections are in use right now. Try connecting later or contact your system administrator”.
There are no GPOs or deployement properties which are limiting the max number of connections.
Do you have any idea?
AFAIK, only TCP 135 and Dynamic Ports are needed.
We purchased Dell Microsoft WS 2022 5RDS DEVICE License and misplaced the license before installation. Is there a way for Microsoft to assist getting a key for the license. We bought the license from Tarsus in South Africa.
Contact reseller or Microsoft directly for assistance( Global Customer Service phone numbers https://support.microsoft.com/en-gb/topic/global-customer-service-phone-numbers-c0389ade-5640-e588-8b0e-28de8afeb3f2)
Is it possible to install multi RDS CALs license key into one server?
Of course, you can install severel RDS CALs license packs on the same RD licensing host.