Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2022 / How to Install and Activate the RDS Licensing Role and CALs on Windows Server

February 13, 2024

How to Install and Activate the RDS Licensing Role and CALs on Windows Server

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.

Contents:
  • Install the Remote Desktop Licensing Role on Windows Server
  • Activate the Remote Desktop Services License Server
  • Install RDS Client Access Licenses (CALs) on Windows Server
  • Configure Licensing Settings on RD Session Hosts
  • Managing Remote Desktop 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).

By listing the members of this group, you can quickly find all hosts with RDS licenses in the domain.

AD group Terminal Server License Servers

Install the Remote Desktop Licensing service from the Server Manager console (Add Roles and Features -> Remote Desktop Services -> Remote Desktop Licensing).

Remote Desktop Services Licensing service

Wait for the role to be installed. RDS licensing feature installation

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

rds licensing role install with powershell

Two MMC consoles are used to manage the RDS Licensing service.

  • Remote Desktop Licensing Manager (licmgr.exe)
  • RD Licensing Diagnoser (lsdiag.msc)

RDS license management snap ins

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.

activa rds licensing 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.

RDS license server automatic activation

Next, fill in some information about your company (some fields are required).

rds license company info

Click the Finish button. The following message should appear:

The license server has been successfully activated.

rds 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.

review rds activation info

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

    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 CAL2012 CAL2016 CAL2019 CAL2022 CAL
2008 R2YesNoNoNoNo
2012YesYesNoNoNo
2012 R2YesYesNoNoNo
2016YesYesYesNoNo
2019YesYesYesYesNo
2022YesYesYesYesYes
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.

rds license code is not recognized

Right-click your host in the Remote Desktop Licensing Manager console and select Install Licenses.

installing rds CAL

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.

rds cal - 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.

rds cal - agreement number

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.

select license type and number of RDS CALs

You can convert RDS User CALs to Device CALs (and vice versa) using the Convert Licenses option in the RD Licensing Manager console.

Convert RDS CALs

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”.

rds 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.

set rd license server via server manager

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:

  • 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.

gpo - Use the specified Remote Desktop license servers

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):

  • 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.

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.

rds licensing diagnoser licenses are not available

In our case, the RDP client connection error appeared after specifying a new RD Licensing 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.

RDS-CALs assigned to client in event viewer log

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.

rds cals generate usage report

View information on installed and used RDS CALs using PowerShell:

Get-WmiObject Win32_TSLicenseKeyPack|select-object KeyPackId,ProductVersion,TypeAndModel,AvailableLicenses,IssuedLicenses |ft

Win32_TSLicenseKeyPack get RDS CAL packs installed

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).

revoke RDS CAL

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()

Up to 20% of per-device RDS CALs can be revoked. Per-User CALs cannot be revoked.
28 comments
10
Facebook Twitter Google + Pinterest
Windows Server 2016Windows Server 2019Windows Server 2022
previous post
Checking Active TCP/IP Connections on Windows with PowerShell
next post
Basic Commands to Configure and Manage Windows Server Core

Related Reading

How to Convert (Upgrade) Windows Server Evaluation to...

March 15, 2024

Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

March 17, 2024

How to Refresh (Update) Group Policy Settings on...

August 13, 2024

Configuring SSH Public Key Authentication on Windows

March 15, 2024

How to Enable Wireless (Wi-Fi) on Windows Server...

June 8, 2023

Using PowerShell Behind a Proxy Server

March 17, 2024

Updating Group Policy Administrative Templates (ADMX)

January 24, 2025

How to Run File Explorer Elevated (as Administrator)...

March 7, 2024

28 comments

dart January 19, 2019 - 7:11 am

RD Licensing Diagnoser won’t appear until you install the Remote Desktop Session host role.

Reply
vipul February 11, 2019 - 8:09 am

is it necessary to install ADDS to activate CAL in Windows server 2016 Standard?

Reply
Lotfi Lakhal March 28, 2019 - 8:45 am

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.

Reply
admin April 3, 2019 - 6:15 am

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.

Reply
DNirodha June 8, 2020 - 5:25 pm

Thank you Sooo much… This is great work. Knowledge sharing is very very valuable……

Reply
basheer June 25, 2020 - 2:49 am

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.

Reply
Amit September 4, 2020 - 12:42 pm

great article. Really helpful

Reply
Shlomi October 1, 2020 - 8:16 am

Many thanks! Helped me Install the license correctly.

Reply
Paul October 9, 2020 - 2:01 pm

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?

Reply
admin October 10, 2020 - 8:43 am

Check this post https://woshub.com/licensing-mode-rds-host-not-configured/

Reply
Rihan December 8, 2020 - 10:05 am

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?

Reply
Neo August 21, 2021 - 2:45 am

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

Reply
Sam September 11, 2021 - 8:16 pm

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!

Reply
Kris October 20, 2021 - 3:25 pm

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?

Reply
admin October 26, 2021 - 11:11 am

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.

Reply
Lebon Mudumba February 22, 2022 - 2:50 am

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

Reply
gohar amjad April 21, 2022 - 10:18 am

RDS Host and RDS licensing servers are in the same domain. tell me how to ADDS server take licenser from RDS Licensing server

Reply
admin May 12, 2022 - 7:09 am

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.

Reply
Trinity Gave October 19, 2022 - 4:02 pm

Thank you , I just followed the instructions ,and install the server 2019 RDS Users cal successfully

Reply
Radovan January 5, 2023 - 6:16 pm

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)!

Reply
admin January 9, 2023 - 4:30 am

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/

Reply
Mike January 26, 2023 - 1:49 pm

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

Reply
Ale June 1, 2023 - 3:01 pm

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?

Reply
Tomislav February 22, 2024 - 1:33 pm

AFAIK, only TCP 135 and Dynamic Ports are needed.

Reply
Phineas May 10, 2024 - 9:48 am

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.

Reply
admin May 21, 2024 - 12:02 pm

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)

Reply
Buntheun Chim September 16, 2024 - 7:16 am

Is it possible to install multi RDS CALs license key into one server?

Reply
admin September 21, 2024 - 8:08 am

Of course, you can install severel RDS CALs license packs on the same RD licensing host.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Convert (Upgrade) Windows Server Evaluation to Full Version
  • Configuring Port Forwarding in Windows
  • Tracking and Analyzing Remote Desktop Connection Logs in Windows
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10
  • Configuring SFTP (SSH FTP) Server on Windows
  • Installing Remote Desktop HTML5 Web Client on Windows Server RDS
  • How to Connect L2TP/IPSec VPN Server From Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top