Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows Server 2019 / Fix: Remote Desktop Licensing Mode is not Configured

August 24, 2023 Group PoliciesPowerShellWindows Server 2016Windows Server 2019Windows Server 2022

Fix: Remote Desktop Licensing Mode is not Configured

When configuring a new RDS farm node on Windows Server 2022/2019/2016/2012 R2, you may see the following tray warning pop-up:

Licensing mode for the Remote Desktop Session Host is not configured.
Remote Desktop Service will stop working in 104 days.
On the RD Connection Broker server, use Server Manager to specify the Remote Desktop licensing mode and the license server.

WinServer 2012 R2 - Licensing mode for the RDSH is not configured

At the same time, there will be warnings with an Event ID 18 in the Event Viewer:

Log Name: System
Source: Microsoft-Windows-TerminalServices-Licensing
Level: Warning
Description:
The Remote Desktop license server UK-RDS01 has not been activated and therefore will only issue temporary licenses. To issue permanent licenses, the Remote Desktop license server must be activated.
This problem will also occur if there are no Remote Desktop Licensing (RDS) servers available on your network to provide a license.

These errors are an indication that your RDS is running in the License grace period mode. You can use Remote Desktop Session Host for 120 days without activating RDS licenses during the grace period. When the grace period expires, users won’t be able to connect to RDSH with an error:

Remote Desktop Services will stop working because this computer is past grace period and has not contacted at least a valid Windows Server 2012 license server. Click this message to open RD Session Host Server Configuration to use Licensing Diagnosis.

The number of days remaining before the RDS grace period expires can be displayed using the command:

wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays

Check the Licensing Settings on the Remote Desktop Server

To diagnose the problem, run the Remote Desktop Licensing Diagnoser tool (lsdiag.msc, or  Administrative Tools -> Remote Desktop Services -> RD Licensing Diagnoser). The tool should display the following error:

Licenses are not available for the Remote Desktop Session Host server, and RD Licensing Diagnoser has identified licensing problem for the RD Session Host server.
Licensing mode for the Remote Desktop Session Host is not configured.
Number of licenses available for clients: 0
Set the licensing mode on the Remote Desktop Session Host server to either Per User or Per Device. Use RD Licensing Manager to install the corresponding licenses on the license server
The Remote Desktop Session Host server is within its grace period, but the Session Host server has not been configured with any license server.

As you can see, there are no licenses available to Clients on the RDS Host because the Licensing Mode is not set.

Remote Desktop Licensing Diagnoser: Licensing mode for the Remote Desktop Session Host is not configured

The most likely problem is that the administrator has not set the RDS Licensing Server and/or the licensing mode. This should be done even if the license type was already specified when the RDS Host was deployed (Configure the deployment -> RD Licensing -> Select the Remote Desktop licensing mode).

set rd licensing mode during deployment

Configuring the RDS Licensing Mode on Windows Server

There are several ways to configure host RDS licensing settings:

  • Using PowerShell
  • Via the Windows Registry
  • Using the Group Policy (preferred)

Set the Remote Desktop licensing mode via GPO

To configure the license server settings on the RDS host, you must use the domain GPO management console (gpmc.msc) or the local Group Policy editor (gpedit.msc).

On a standalone RDSH host (in a domain and workgroup), it’s easiest to use local policy. Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing.

We need two GPO options:

  • Use the specified Remote Desktop license servers – enable the policy and specify the RDS license server addresses. If the RD license server is running on the same host, type 127.0.0.1You can specify the addresses of multiple hosts with the RDS Licensing role separated by commas; Policy - Use the specified Remote Desktop license servers
  • Set the Remote Desktop licensing mode – select the licensing mode. In our case, it is Per User. POlicy - Set the Remote Desktop licensing mode - Per User
If you have deployed an RDS host without an AD domain (in a workgroup), you can only use Per Device RDS CALs. Otherwise, a message is displayed when a user logs in to the RDSH server in the workgroup:

Remote Desktop Issue.There is a problem with your Remote Desktop license, and your session will be disconnected in 60 minutes. Contact your system administrator to fix the problem.

Set RDS licensing mode from the PowerShell prompt

Open a PowerShell console and check that the RDS licensing server address is configured on your RDSH:

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()

GetSpecifiedLicenseServerList

Note. In this case, the data that the Get-RDLicenseConfiguration cmdlet returns may be completely different and incorrect.

If the RDS license server is not configured, you can set it using the command:

$obj.SetSpecifiedLicenseServerList("uk-rdslic1.woshub.com")

You can also set the licensing mode (4 — Per User, or 2 — Per Device):

$obj.ChangeMode(4)

powershell: change RDS licensing mode

You can use the Get-ADObject cmdlet from the ActiveDirectory PowerShell module to list servers with the RDS Licensing role in an Active Directory domain:

Get-ADObject -Filter {objectClass -eq 'serviceConnectionPoint' -and Name -eq 'TermServLicensing'}

You can also configure the licensing parameters of the RDS host via a host with the RD Connection Broker role:

Set-RDLicenseConfiguration -LicenseServer @("uk-rdslic1.woshub.com","uk-rdslic2.woshub.com") -Mode PerDevice -ConnectionBroker "uk-rdcb1.woshub.com"

Configuring RDS licensing settings via the registry

In the HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core key, you will need to change the DWORD value of the parameter LicensingMode from a value of 5 (license mode not set):

  • 2 – if Per Device RDS licensing mode is used;
  • 4 – if Per User licensing is used.

rds licensing mode - LicensingMode registry parameter

You can change the registry setting manually by using regedit.exe or following PowerShell commands that allow you to change the values of registry items:

# Specify the RDS licensing mode: 2 - Per Device CAL, 4 - Per User CAL
$RDSCALMode = 2
# RDS Licensing hostname
$RDSlicServer = "uk-rdslic1.woshub.com"
# Set the server name and licensing mode in the registry
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

Once you have made the changes, restart your RDSH server. Then open the RDS Licensing Diagnoser console.  If you have configured everything correctly, you should see the number of licenses available for clients and the licensing mode you have set (Licensing mode: Per device).

RD Licensing Diagnoser did not identify any licensing problems for the Remote Desktop Session Host.

number of available rds licenses

If a firewall is used on your network, you must open the following ports from the RDSH host to the RDS licensing server – TCP:135, UDP:137, UDP:138, TCP:139, TCP:445, TCP:49152–65535 (RPC range).

You can use the Test-NetConnection cmdlet to check for open and closed ports. If ports are closed in the local Windows Defender firewall, you can use PowerShell or GPO to manage firewall rules.

Also note that if the RD Licensing Server has, for example, Windows Server 2016 OS and CALs for RDS 2016 installed, you will not be able to install RDS CAL licenses for Windows Server 2019 or 2022. The 'Remote Desktop Licensing mode is not configured'error persists even when you specify the correct license type and RDS license server name. Older versions of Windows Server simply don’t support RDS CALs for newer versions of WS.

In this case, the following message will be displayed in the RD License Diagnoser window:

The Remote Desktop Session Host is in Per User licensing mode and no Redirector Mode, but license server does not have any installed license with the following attributes:
Product version: Windows Server 2016
Use RD Licensing Manager to install the appropriate licenses on the license server.

The Remote Desktop Session Host is in Per User licensing mode and no Redirector Mode, but license server does not have any installed appropriate license with the

You must first upgrade the version of Windows Server on the license server or deploy a new RD License host. A newer version of Windows Server (for example, WS 2022) has support for RDS CALs for all previous versions of Windows Server.

Note. Licensing report not generated if RDS host is in a workgroup. Although the terminal RDS licenses themselves are correctly issued to clients/devices. You will need to keep track of the number of RDS CALs you have left. You must monitor the number of RDS CALs remaining.

37 comments
23
Facebook Twitter Google + Pinterest
previous post
Allow Anonymous Access to Shared Folder or Printer on Windows
next post
Computer Doesn’t Turn Off After Shutting Down Windows 10/11

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

Removing Azure Arc Setup Feature on Windows Server...

November 9, 2023

Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

November 7, 2023

Send Emails with Microsoft Graph API and PowerShell

November 6, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

37 comments

Usman Ghani May 9, 2019 - 6:14 am

Thank you for saving my day, I tested on Windows 2016 server and worked perfectly.

Reply
vitaliy May 22, 2019 - 9:05 am

Thank you from Russia!!!

Reply
Taavi June 18, 2019 - 9:23 pm

Very helpful, it’s silly how complicated Microsoft makes some stuff

Reply
Jose Rosario June 19, 2019 - 10:13 am

What a lifesaver this page was. So simple!

Reply
Stephan July 4, 2019 - 11:31 am

Fantastic, Thank you, with your explanation, it was possible to license our server.

Reply
Sudiro Sudiro July 18, 2019 - 11:35 am

awesome..thank you

Reply
Jose July 26, 2019 - 5:05 pm

Funciono perfecto, en verdad me ayudo a quitarme un dolor de cabeza

Reply
Ryan August 17, 2019 - 6:34 pm

This is confirmed the same on Server 2019 as well.

Reply
nick September 25, 2019 - 5:41 pm

thanks this worked for me on server 2019 aswell absolute life saver

Reply
Luis October 18, 2019 - 11:03 pm

Thank you from Colombia. This works in windows 2016. Me salvaste la patria.

Reply
Anil Varghese November 3, 2019 - 10:38 am

Thank You from Australia.

Reply
Karthik Mylavarapu November 4, 2019 - 9:50 am

This configuration has to be just done on the DC which is the host Server or on all the Server Desktops where this License is applied ?

Reply
Mark A. Dunn November 5, 2019 - 3:13 pm

Thank you!! I’ve been pulling my hair out on this one! Using the GPO worked like a champ.

Reply
Colin Jackson November 16, 2019 - 3:27 pm

Thank you very much, helped me a lot.

Reply
Junior rondini December 4, 2019 - 6:15 pm

i have a problem like this… my rdp don’t block more users, i have a license for three users, but i connect more than three and go normally, and i don’t find the problem..

Reply
admin January 15, 2020 - 9:42 am

Check how many RDS CALs are available on your RD License servere. You can also use the RD Licensing Diagnoser.

Reply
Winnie February 25, 2020 - 3:09 pm

GREAT!! Now this article made it!! I spent days but my installed licenses were not registered.The Power Shell commands was the kick!
THANK YOU VERY MUCH!!

Reply
Denis April 17, 2020 - 7:36 am

Thank you from Ukraine. It working for me!

Reply
Grant June 11, 2020 - 12:09 pm

This was great. Thanks. Used the GPO method for a 2019 workgroup server.

Reply
Maurice July 7, 2020 - 3:52 pm

Thanks for your solution!

Reply
SME September 19, 2020 - 9:29 pm

Thank you, it helped.

Reply
MJ October 11, 2020 - 4:42 pm

You are close to GOD….(whichever one you may believe in!)…. Thx.

Reply
MJ October 11, 2020 - 4:56 pm

Hang on…..problem not solved even though RD Licensing Diagnoser shows all is well!
Now I get
“Remote Desktop Issue
There is a problem with your Remote Desktop licence, and your session will be disconnected in 60 minutes. Contact your system administrator to fix the problem.” when I log in as a user!!!

Reply
michszym February 2, 2021 - 11:25 am

I guess you have configured RDS CAL per user and you have workgroup (not AD) – you need to configure RDS to use licences per Device and you can convert RDS CAL if you already bought “RDS CAL per User” – there is such option in Licensing Manager

Reply
Michael November 3, 2020 - 4:14 pm

Thanks, this worked for me on Server 2019

Reply
Vincent Tran December 11, 2020 - 7:56 am

Thanks mucho, your article has guided me into directly way to solve my problem.

Reply
Chris V. January 19, 2021 - 7:38 am

Many thanks, this helps to solve my problem on Server 2019

Reply
Chris C. January 31, 2021 - 11:44 am

Thx, worked perfectly for server 2019!

Reply
Jason February 2, 2021 - 3:48 am

The GPO fix did the trick! Thank you so much!!!

Reply
Jim Hawley February 9, 2021 - 8:54 pm

I purchased and installed a pack of 5 per user CALs for Server 2019 RDS while still in the “grace period” but there is no evidence of the 5 licenses in the RD licensing manager. The manager reports 50 CALs and 14 issued with expirations in late February and early March, 2021. I tried reinstalling the 5 pack in case I missed something in the original activation but the MS licensing server reported the 5 pack had already been installed. I’m concerned when the grace period licenses expire we’ll be locked out of the RDP server even though there are currently 5 valid per user CALs licenses. I plan to purchase an additional 10 per user CALs prior to the grace period expiration. The license diagnoser shows no problems, all check marks are green. Are we OK after the grace period expires?

Reply
Matija February 21, 2023 - 8:51 am

Hello, I have windows server 2022 Standard host installed and I need to activate windows server call per user RDS, but it happened to me that I had to reset windows and booted everything from the beginning and now it tells me that the license is already activated, do you have any idea how to activate it again RDS license and to be functional?
Thank you in advance
Best regards

Reply
serg February 21, 2023 - 5:13 pm

Try calling Microsoft support. Looks like you need to reset your licences

Reply
Constantinos February 28, 2023 - 3:10 pm

I have installed 2 2012r2 servers, and I already have a licensing server with available licenses. However on the second server adding the license server either using the GUI in server manager or using powershell makes no difference. Diagnoser gives a message that there are no licenses available for clients and sever manager does not show license server in Deployment. Adding the server succeeds without any error. RD Licensing is already set to per user same as the working server and license server appears bellow.
What could it be wrong?

Reply
admin March 1, 2023 - 6:36 am

1) Check the version of the RDS CALs on the license server. They must be Windows Server 2012 R2 CALs.
2) Check for open ports between the RDS host and the licence server.
3) Try specifying the RDS licence server on the RDSH via the GPO options (“Use the specified Remote Desktop license servers” + “Set the Remote Desktop licensing mode”). Follow the guide Configuring RDS Licenses on RD Session Hosts

Reply
Constantinos March 1, 2023 - 9:21 am

License server has Windows 2012 CALs, not 2012 R2. However the working RD Server also has Windows 2012 R2 and does not report an issue.
Firewalls are disabled.
Ports that are open (respond to Test-netconnection) from both servers : 135,139,445. Connectivity on the RD Server to RD LIC server on licensing diagnoser appears as available. LD is also showing no problems except from 0 licenses

I also added the server using gpedit and restarted. No change.

Reply
Constantinos March 2, 2023 - 1:54 pm

Issue was resolved after installing the latest 2023 updates for Windows 2012 R2.

Have no idea what it changed

Reply
zaqik October 5, 2023 - 12:21 am

>>You must monitor the number of RDS CALs remaining.
HOW???

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Updating List of Trusted Root Certificates in Windows
  • Configure Google Chrome Settings with Group Policy
  • How to Delete Old User Profiles in Windows
  • Allow Non-admin Users RDP Access to Windows Server
  • How to Backup and Copy Local Group Policy Settings to Another Computer
  • How to Find the Source of Account Lockouts in Active Directory
  • How to Disable or Enable USB Drives in Windows using Group Policy
Footer Logo

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


Back To Top