How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (2023)

In this article, we’ll consider the installation, configuration, and activation of the Remote Desktop Licensing role on Windows Server 2019 and 2016, as well as the installation and activation of the RDS client access licenses (CALs).

I remind you that after the installation of the Remote Desktop Session Host role, users can use it only for 120 days of a trial period (evaluation license), and users can’t connect to an RDS host afterward. According to Microsoft licensing rules, all users or devices that use RDS features must be licensed. To register and issue Remote Desktop Client Access Licenses (RDS CALs), there is a separate Windows service in the RDS role called Remote Desktop License Server.

Contents:

  • Install the Remote Desktop Licensing Role on Windows Server 2019/2016
  • Activating the RDS License Server on Windows Server
  • RDS CALs: Types of Remote Desktop Client Access Licenses
  • Installing RDS CALs on Windows Server 2019/2016
  • RDS CAL Usage Reports
  • How to Remove RDS CALs from an RD License Server?
  • Configuring RDS Licenses on RD Session Hosts

Install the Remote Desktop Licensing Role on Windows Server 2019/2016

You can deploy the Remote Desktop License service on any domain server. It is not necessary to install it on one of the servers on the RDSH farm.

Before you start the installation, add a new server to the Terminal Server License Servers domain security group (or make sure you have the permission to change this group membership), otherwise, the server won’t be able to issue RDS Per User CAL to the domain users.

You can install Remote Desktop Licensing using Server Manager. To do it, select the Remote Desktop Services role in the Add Roles and Features Wizard.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (1)

Select Remote Desktop Licensing as the role service.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (2)

It remains to wait until the installation of the role is completed.
How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (3)

The RDS-Licensing service is managed using the Remote Desktop Licensing Manager console (licmgr.exe).

In Windows Server, it’s easier to install roles and features using PowerShell. To install the RDS Licensing Service and RD Licensing Diagnoser, just run one command:

Install-WindowsFeature RDS-Licensing –IncludeAllSubFeature -IncludeManagementTools

To list the RDS services installed on the host, use the command:

Get-WindowsFeature -Name RDS* | Where installed

Activating the RDS License Server on Windows Server

In order to issue licenses to RDP clients, your RDS License Server must be activated. To do it, open the Remote Desktop Licensing Manager (licmgr.exe), right-click the name of your server, and select Activate Server.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (5)

(Video) How to install and configure Remote Desktop Services (RDS) on Windows 2016

The RDS licensing server activation wizard will start. Here you will need to select the activation method you prefer. If your server is connected to the Internet, it can automatically connect to Microsoft servers and activate the RDS license server. If there is no direct Internet access from the server, you can activate the server using a web browser or by phone.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (6)

Then you must fill in some information about your company (some of the fields are required).

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (7)

It remains to click the Finish button.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (8)

If you right-click the server name in the console and select Review Configuration, you can verify that the RDS License Server is activated and can be used to activate RDSH clients in your 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.

How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (9)

RDS CALs: Types of Remote Desktop Client Access Licenses

Each user or device that connects to Remote Desktop Session hosts must have a client access license (CAL). There are two types of RDS CALs:

  • Per-Device CAL – is the permanent license type assigned to a computer (device) that connects to the RDS server more than once (when a device is first connected, a temporary license is issued to it). These licenses are not concurrent, i.e., if you have 10 Per Device licenses, only 10 hosts can connect to your RDS server. The current OVL RDS CAL is called: WinRmtDsktpSrvcsCAL 2019 SNGL OLV NL Each AP DvcCAL;
  • Per-User CAL – is the type of license that allows a user to connect to the RDS server from any number of computers/devices. This type of license is associated with an Active Directory user and issued not permanently, but for a specific period of time. The license is issued for a period of 52 to 89 days (random number). The current Open Value license of this type is called WinRmtDsktpSrvcsCAL 2019 SNGL OLV NL Each AP UsrCAL.

    If you try to use RDS 2019 Per User CAL in a workgroup (not in a domain), then the RDSH server will forcibly ending a user session every 60 minutes with a message: “Remote Desktop License Issue: There is a problem with your Remote Desktop license, and your session will be disconnected in 60 minutes”. Therefore, for RDS servers in a Windows Workgroup environment, you need to use the only device licensing (Per Device RDS CALs).

    .

    Note.We should note that the 2016 RDS CAL may be installed only on a licensing server running Windows Server 2016 or 2019. Installing RDS CALs to the previous Windows Server versions is not supported. Those, you cannot install 2016 RDS CALs on a Windows Server 2012 R2 licensing host.

    When trying to add new RDS CALs 2019 on Windows Server 2016, an error will appear:

    RD Licensing ManagerThe license code is not recognized. Ensure that you have entered the correct license code.

    Installing RDS CALs on Windows Server 2019/2016

    Now you must install the pack of Remote Desktop client licenses (RDS CAL) you have purchased on the License Server.

    Right-click your server in Remote Desktop Licensing Manager and select Install Licenses.

    How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (12)

    (Video) Windows Server 2019 Training 24 - How to Install & Configure RDS (Remote Desktop Services)

    Select the activation method (automatic, online, or by phone) and the license program (in our case, it is Enterprise Agreement).

    Many enterprise agreement numbers for RDS have already been leaked on the Internet. I think it won’t be a problem to find the numbers (4965437), you don’t even need to look for rds cracks or activators.

    How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (13)

    How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (14)

    The next steps of the wizard depend on which license program you have selected. In the case of an Enterprise Agreement, you must specify its number. If you have chosen License Pack (Retail Purchase), enter the 25-character product key you got from Microsoft or a partner.

    Specify the product version (Windows Server 2019/2016), license type (RDS Per user CAL), and the number of licenses to be installed on the server.

    How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (15)

    After that, the server can issue licenses (RDS CAL) to clients.

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

    If you have run out of free RDS licenses, you can revoke previously issued RDS Device CALs for inactive computers using the following PowerShell script:

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

    RDS CAL Usage Reports

    In the RDS License Console, you can generate a license usage report. To do this, select Create Report -> CAL Usage from the server context menu.

    However, I prefer to use PowerShell to report RDS CAL usage. The following script will show the remaining number of licenses in all RDS CAL packs:

    Import-Module RemoteDesktopServices -ErrorAction Stop
    Set-Location -Path 'rds:' -ErrorAction Stop
    $licenses = (Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\* | Where-Object Name -Like "-Per User-*").Name
    $total=0;
    $issued=0;
    foreach ($license in $licenses) {
    $count=(Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\$license\TotalLicenses).CurrentValue
    $total= $total + $count
    $count2=(Get-Item -Path RDS:\LicenseServer\LicenseKeyPacks\$license\IssuedLicensesCount).CurrentValue
    $issued= $issued + $count2
    }
    $available = $total - $issued
    Write-Host "Total Licenses available: $available"

    You can run this PowerShell script via Zabbix and set an alert if the remaining number of licenses is less, for example, 5.

    The following Powershell script will allow you to generate a Per User CAL Report:

    Import-Module RemoteDesktopServices -ErrorAction Stop
    Set-Location -Path 'rds:' -ErrorAction Stop
    $path = “C:\Reports\RDS_CAL_Usage.csv”
    $fileName = (Invoke-WmiMethod Win32_TSLicenseReport -Name GenerateReportEx).FileName
    $fileEntries = (Get-WmiObject Win32_TSLicenseReport | Where-Object FileName -eq $fileName).FetchReportEntries(0,0).ReportEntries
    $objArray = @()
    foreach($entry in $fileEntries){
    $objArray += $entry | select User, ProductVersion, CALType, ExpirationDate
    $objArray[-1].User = $objArray[-1].User.Split('\') | select -Last 1
    $time = $objArray[-1].ExpirationDate.Split('.') | select -first 1
    $objArray[-1].ExpirationDate = [datetime]::ParseExact($time, "yyyyMMddHHmmss", $null)
    }
    $objArray | Export-Csv -Path $path -Delimiter ',' -NoTypeInformation

    (Video) Remote Working with Azure Virtual Desktops

    How to Remove RDS CALs from an RD License Server?

    If you want to move your RDS CAL license packs from one Remote Desktop licensing server to another, you can remove the installed RDS CAL license pack from the licensing server using PowerShell.

    Using the following cmdlet, you can list all the installed RDS CAL packs on the server:

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

    Find the KeyPackId value for the RDS CAL package that you want to remove and run the command:

    wmic /namespace:\\root\CIMV2 PATH Win32_TSLicenseKeyPack CALL UninstallLicenseKeyPackWithId yourKeyPackId

    You can also completely remove all CALs by re-creating the RDS license database. To do this, stop the Remote Desktop Licensing service:

    Stop-Service TermServLicensing

    Rename the file C:\Windows\System32\lserver\TLSLic.edb to C:\Windows\System32\lserver\TLSLic.edb_bak and start the service:

    Start-Service TermServLicensing

    After that, all RDS CAL licenses will be removed, and you must reactivate them.

    Configuring RDS Licenses on RD Session Hosts

    After the RDS License Server is activated and being run, you can reconfigure RD Session Host to obtain CAL licenses from this server. You can set the license type and specify the name of the license server from the Server Manager GUI, using PowerShell, or Group Policy.

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

    In the deployment properties, go to the RD Licensing tab, select the Remote Desktop licensing mode, and set the RDS license server. 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”.

    You can change the RDS license server address and CAL type using PowerShell:

    (Video) Licensing Microsoft Server in a Virtual Environment

    $obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting

    Then specify the license type you need:

    $obj.ChangeMode(4)

    Note. Enter 4 if the server must use Per User licensing type, and 2, if it is Per Device.

    Then specify the name of the RDS License Server:

    $obj.SetSpecifiedLicenseServerList("rdslic2016.woshub.com")

    And check the current settings:

    $obj.GetSpecifiedLicenseServerList()

    If you want to assign the RDS licensing server parameters via Group Policy, you need to create a new GPO and link it to the OU with RDS servers (or you can specify the name of the RDS licensing server using the Local Group Policy Editor – gpedit.msc). The RD licensing settings are located under the following GPO section: Computer Configuration-> Policies -> Admin Templates -> Windows Components -> Remote Desktop Services -> RemoteDesktop Session Host -> Licensing.

    There are two Remote Desktop settings that we need to configure:

    • Use the specified Remote Desktop license servers – the address of the License Server is set;
    • Set the Remote Desktop licensing mode – select RDS CAL license type.

    How to Install and Activate the RDS Licensing Role and CALs on Windows Server 2019/2016? | Windows OS Hub (22)

    RDSH hosts use the following network ports to obtain an RDS license from the RDS Licensing server. Make sure that 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

    You can check for open ports using the PortQry tool or the Test-NetConnection cmdlet.

    Try to check the RD License Server status and the number of the issued licenses using the Remote Desktop Licensing Diagnoser tool (lsdiag.msc or Administrative Tools -> Remote Desktop Services -> RD Licensing Diagnoser). RD Licensing Diagnoster can be installed on RDSH servers using Server Manager (Features -> Remote Server Administration Tools -> Role Administration Tools -> Remote Desktop Services Tools -> Remote Desktop Licensing Diagnoser Tools).

    If the RDSH server is not configured to use an RDS license server, the following warnings will appear in the Licensing Diagnoser console:

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

    If you installed RDSH on the Windows Server Evaluation edition, do not forget to convert it to the full version according to the guide. Without conversion, RDSH services on such a host will only work for 120 days, even if you target it to an activated RDS license server.

    If there are no warnings, and you see the message “RD Licensing Diagnoser did not identify any licensing problems for the Remote Desktop Session Host server”, then the RDSH server can successfully receive RDS CALs for remote users and/or devices.

    (Video) Microsoft Licensing Basics, Models, Fundamentals Training 2021

    Note. In our case, after we specified the new License Server address the following error started to appear on the RDP client: “The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license”. The problem can be solved by removing the L$RTMTIMEBOMB key from the registry on the RDSH server.

FAQs

How do I install and activate the RDS licensing role on Windows Server 2019 2016? ›

Activate the license server

Open the Remote Desktop Licensing Manager: click Start > Administrative Tools > Remote Desktop Services > Remote Desktop Licensing Manager. Right-click the license server, and then click Activate Server.

How to install RDS CALs license in Windows Server 2019? ›

On the license server (usually the first RD Connection Broker), open the Remote Desktop Licensing Manager. Right-click the license server, and then click Install licenses. Click Next on the welcome page. Select the program you purchased your RDS CALs from, and then click Next.

How to install 2019 RDS CALs on Windows Server 2016? ›

Installing RDS CALs on Windows Server 2019/2016

Right-click your server in Remote Desktop Licensing Manager and select Install Licenses. Select the activation method (automatic, online, or by phone) and the license program (in our case, it is Enterprise Agreement).

How to install RDS role on Server 2019? ›

To do this, follow these steps:
  1. Open Server Manager.
  2. Click Manage and select Add Roles and Features.
  3. Select Role-based or Feature-based installation.
  4. Select the computer as the destination server.
  5. On the Select server roles page, select Remote Desktop Services.
Apr 6, 2022

Does Windows Server 2019 come with RDS CALs? ›

This Windows Server 2019 licensing package offers CALs in a quantity of five. It covers a remote desktop service CAL, which is necessary for access to programs on a physical desktop.

How do I install remote server tools RSAT for Windows Server 2019? ›

On the Windows Server 2019 open Server Manager. If Server Manager does not start by default press the “Windows + R” keys, Type “servermanager” in the “Open” field and press “Enter” or click the OK button. On the Server Manager main windows Click “Add roles and features”.

Will 2016 RDS CALs work on 2019? ›

RDS CALS are generally "backward compatible" in that a Server 2022 RDS CAL is valid for a Server 2019 RDS host (and probably also for Server 2016, Server 2012 R2, etc.).

How do I enable RDS CALs? ›

2. Installing RD CALs
  1. Launch the RDS license manager if not already running. ...
  2. Right-click the server name and select Install Licenses.
  3. Choose the applicable license program and click Next. ...
  4. Enter the licensing information requested and click Next.
  5. Enter the product version, license type, and quantity and click Next.
Mar 15, 2021

Where is Cal license on Windows Server 2019? ›

In Remote Desktop Licensing Manager right-click the license server, click Create Report, and then click CAL Usage. The report is created and a message appears to confirm that the report was successfully created.

How to Install RDS license on Server 2016? ›

Install the RD Licensing role

In Server Manager, click Roles Summary, and then click Add Roles. Click Next on the first page of the roles wizard. Select Remote Desktop Services, and then click Next, and then Next on the Remote Desktop Services page. Select Remote Desktop Licensing, and then click Next.

How do I enable desktop experience on Windows Server 2019? ›

Add the Desktop Experience feature
  1. Open Server Manager and right-click the Features node.
  2. Select Add Features from the menu that appears. ...
  3. Select the Desktop Experience check box. ...
  4. Click Add Required Features, and then click Next. ...
  5. Click Install.

How to Install RD Licensing Diagnoser? ›

How to do it...
  1. Open the RD Session Host Configuration console by navigating to Start | Run | tsconfig. msc.
  2. Click on Licensing Diagnosis in the left pane:
  3. Select the RD License server in the Remote Desktop Services License Server Information pane to view more details on the RD License server:

How to enable Remote Desktop Services in Windows Server 2016? ›

  1. Open the System Properties: For Windows Server 2012 to Windows Server 2016: ...
  2. In Computer Information, click Configure Remote Desktop:
  3. In the System Properties dialog box, under Remote Desktop, click one of the following options: ...
  4. Review the information in the Remote Desktop dialog box, and then click OK twice.
Sep 27, 2021

How to install RDS role on server 2016 using PowerShell? ›

1. Type Start PowerShell in the Command Prompt window to start Windows PowerShell. 2. Type Install-WindowsFeature Remote-Desktop-Services and press Enter to install the RDS role.

Where is the Remote Desktop Session host Configuration Tool in server 2019? ›

Steps to configure the Remote Desktop Session Host

Press Windows + R key to open the Run, enter "gpedit. msc" and click OK. Select the Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> License from the left pane.

Does Windows Server 2016 come with CALs? ›

The Windows Server 2016 licensing model includes both Cores + Client Access Licenses (CALs). A Windows Server CAL allows access to any edition of Windows Server of the same or earlier version. Each Window Server CAL provides access to multiple licenses of Windows Server.

Do I need server CALs and RDS CALs? ›

If the RDS CAL is available, the RDSH server accepts the connection from the user and starts a session. When it comes to determining the right number of licenses, it's worth noting that you need a Windows Server CAL and an RDS CAL for each user or device.

Are user CALs and RDS CALs the same? ›

Yes. Device, user, and RDS CALs are all designed to access the same server.

How do I manually install RSAT? ›

RSAT for Windows 10, version 1809 or later versions

RSAT is now part of the Operating System an can be installed via Optional Features. To enable the tools, click Start, click Settings, click Apps, and then click Optional features, after that click on the panel Add a feature and enter Remote in the search bar.

How to install RD Licensing Manager? ›

To open Remote Desktop Licensing Manager, click Start, point to Administrative Tools, point to Remote Desktop Services, and then click Remote Desktop Licensing Manager. Right-click the license server SERVERNAME, and then click Install Licenses.

How do I fix RDS 2019 error licensing mode for the Remote Desktop session host is not configured? ›

Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing. We need two policies: Use the specified Remote Desktop license servers – enable the policy and specify the RDS license server address.

How to install RD licensing Diagnoser? ›

How to do it...
  1. Open the RD Session Host Configuration console by navigating to Start | Run | tsconfig. msc.
  2. Click on Licensing Diagnosis in the left pane:
  3. Select the RD License server in the Remote Desktop Services License Server Information pane to view more details on the RD License server:

How do I set up RDS license mode? ›

In the policy list, right-click Set the Remote Desktop licensing mode, and then select Properties. Select Enabled. Under Specify the licensing mode for the Remote Desktop Session Host server, select Per Device or Per User, as appropriate for your deployment.

How do I setup my Rd license? ›

For Windows 2019 & 2022: Set to Enabled, Select Per User (domain setup)/ Select Per device (if a workgroup server)
...
Select role services:
  1. Select Remote Desktop Licensing.
  2. Click Add Feature on the pop-up message.
  3. Select Remote Desktop Session Host.
  4. Click Add Feature on the pop-up message.

How to fix Remote Desktop Licensing mode is not configured? ›

Double-click on the Set Remote Desktop licensing Mode and select the Enable option. Then navigate to the specify the licensing mode for the RD session host server and choose the per user or per device, according to your license mode.

Does Windows Server 2016 still require CALs? ›

CALs are required by Microsoft licensing for all users or devices that access Windows Server Standard or Windows Server Datacenter.

Do I need user CALs and RDS CALs? ›

Each user and device that connects to a Remote Desktop Session host needs a client access license (CAL). You use RD Licensing to install, issue, and track RDS CALs. When a user or a device connects to an RD Session Host server, the RD Session Host server determines if an RDS CAL is needed.

Can I use 2022 CAL on Server 2019? ›

Microsoft CALs have never been forward compatible. If you want to use a newer product, you need to get the appropriate licenses for that version of the product.

Videos

1. 5ICW session 1 Install Windows Server 2016
(Alex Zhao)
2. SID 2016 - Windows Server 2016: Build Hybrid Remote Desktop Services
(SID Conference)
3. Remote Working with Azure Virtual Desktop explained | Setup Azure Virtual Desktop is explained
(Microsoft Exchange, Office 365, Cloud & Others)
4. Azure Virtual Desktop: Desktop as a Service explained
(Sherweb)
5. Solved - Remote Desktop Can´t Connect to The Remote Computer for one of These Reasons - Windows 10
(KELVGLOBAL ICT)
6. Be Core Ready - Microsoft Licensing Changes for Windows Server and System Center
(SoftwareONE)
Top Articles
Latest Posts
Article information

Author: Aron Pacocha

Last Updated: 02/13/2023

Views: 6772

Rating: 4.8 / 5 (48 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Aron Pacocha

Birthday: 1999-08-12

Address: 3808 Moen Corner, Gorczanyport, FL 67364-2074

Phone: +393457723392

Job: Retail Consultant

Hobby: Jewelry making, Cooking, Gaming, Reading, Juggling, Cabaret, Origami

Introduction: My name is Aron Pacocha, I am a happy, tasty, innocent, proud, talented, courageous, magnificent person who loves writing and wants to share my knowledge and understanding with you.