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 2016 / Remote Session Disconnected: No Remote Desktop License Servers/Client Access Licenses Available

March 12, 2021 Windows 10Windows Server 2012 R2Windows Server 2016

Remote Session Disconnected: No Remote Desktop License Servers/Client Access Licenses Available

In this article, we’ll look at several common issues related to RDS licensing, when RDP clients cannot connect to Windows Server with the Remote Desktop Services Host role installed.

Licensing errors when connecting RDP clients to an RDS host may appear if:

  • The RDS licensing server from which you want to get client licenses (RDS CALs) is not specified on the Remote Desktop Services settings;
  • The RDS licensing server has run out of available CALs;
  • The RDP client tries to connect with an expired temporary RDS license;


Contents:
  • Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer
  • The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license
  • Reset 120 Days RDS Grace Period (L$RTMTIMEBOMB)

Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer

First, let’s look at an error related to clients getting RDS CALs from the license server.

Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator.

Remote session was disconnected because there are no Remote Desktop client access licenses available for this computer. Please contact the server administrator.

Connect to the RDSH server in administrative mode (mstsc.exe /admin) and run the RD Licensing Diagnoser tools. If you have everything configured correctly, you should see the name of the RDS licensing server, and the type of license (Per User/Per Device).

rd licensing diagnoser

Connect to the RDS license server using the RD Licensing Manager console (licmgr.exe) and check that you have available free licenses of the required type (Per User or Per Device). If you run out of free RDS CALs, you need to purchase a new CAL pack, wait for someone to release the license, or revoke unused licenses directly from the console (right click on the computer/user and select Revoke License).

available rds CALs

In this example, you can see that there are free RDS CALs, and they are issued to users (Issued = 44).

Hint. If your RDSH server is deployed in a workgroup (not in an AD domain), then you cannot use Per User RDS licenses on it. When connected, your users will always receive a temporary local Per Device license.

Most likely, in this case the client computer is trying to connect to your RDSH server with an expired temporary RDP license (if your RDS license server was unavailable when the client first connected, the client was issued a temporary RDP license for 180 days). In this case, you need to reset this expired license in the registry on the client device.

Do the following on the client computer (Windows 10 in this example):

  1. Start the Registry Editor (regedit.exe);
  2. Remove the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensing;removing mslicensing registry key to reset rdp license on windows 10
  3. Close the registry editor and run the mstsc.exe (Remote Desktop Connection) as as administrator;mstsc run as admin
  4. Connect to your RDS server. In this case, the MSLicensing reg key will be automatically re-created, and the computer will receive a new RDP license.
If you did not run mstsc.exe with administrator permissions, then an error will appear for any RDP connection:

The remote computer disconnected the session because of an error in the licensing protocol. Please try connecting to the remote computer again or contact your server administrator.

The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license

One of the customer has encountered a problem with the deployed farm of RDS servers on Windows Server 2012 R2. For some reason, the RDS server has stopped issuing terminal licenses to users, though the license server role had been installed and configured, and RDP CALs had been activated.

When a user tries to connect to the terminal server via RDP, the following error appears:

The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator.

The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.

Connect to the server console in administrative mode (mstsc /admin). Open the Server Manager, and go to the RDS settings (Remote Desktop Services -> Deployment Overview -> Tasks -> Edit Deployment Properties). Make sure that the correct Remote Desktop license server and RDS CAL type (Per Device or Per User) are specified in the RDSH configuration.

rds deployment properties

You can also check the RDS licensing server settings via PowerShell:

Get-RDLicenseConfiguration

Get-RDLicenseConfiguration

As you can see, LicenseServer is specified in the configuration, and the PerUser licensing type is used.

Check that the following ports are not blocked by firewalls when accessing from RDSH host to RDS LicenseingServer: TCP 135, UDP 137, UDP 138, TCP 139, TCP 445, TCP 49152–65535 (RPC range). If the RDS License server is not available, the License Diagnoser will display an error:

License server rdslic_hostname is not available. This could be caused by network connectivity problems, the Remote Desktop Licensing service is stopped on the license server, or RD Licensing isn't available.

Reset 120 Days RDS Grace Period (L$RTMTIMEBOMB)

Take a close look at the events in the Event Viewer on the RDS host. Perhaps there is an error like this:

EventID: 1128
Source: TerminalServices-RemoteConnectionManagerThe RD Licensing grace period has expired and the service has not registered with a license server with installed licenses. A RD Licensing server is required for continuous operation. A Remote Desktop Session Host server can operate without a license server for 120 days after initial start up.

EventID: 1128

The RD License Diagnoser will most likely also display an error:

The grace period for the Remote Desktop Session Host server has expired, but the RD Session Host server hasn't been configured with any license servers. Connections to the RD Session Host server will be denied unless a license server is configured for the RD Session Host server.

This means that your grace period for the RDSH server has expired, and you need to extend the grace mode, or activate the host on a RDS license server.

The RDS grace period allows you to use Remote Desktop Services on Windows Server for free for 120 days. Most likely, when logging into RDSH as administrator, you saw an error:

Licensing mode for the Remote Desktop Session Host is not configured.
Remote Desktop Service will stop working in 86 days.

The number of days before the end of the RDS Grace Period can be found from the elevated command prompt:

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

rds get GetGracePeriodDays left

Note that DaysLeft = 0. This means that the Grace Period has expired on this RDSH host.

To extend the grace period in RDS, you need to remove the registry parameter on the server, which determines the grace period licensing time. The date that determines the RDS grace period for the server is stored in the reg_binary registry parameter L$RTMTIMEBOMB (quite a funny name –TIME BOMB….) located in the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod

rds reset GracePeriod via registry L$RTMTIMEBOMB

You have to remove the L$RTMTIMEBOMB parameter from the registry. However, the administrator does not have enough permissions to do this.

Unable to delete all specified values.

unable to remove registry parameter

To remove this registry parameter, you need to open the parent key permissions and grant your account the privileges of the key owner. Then set the Full Control permissions for Administrators group (I won’t describe the process in detail).

rd grace period reg key grant admin permissions

Now, right-click L$RTMTIMEBOMB parameter and delete it.

delete key

Restart your RDSH server, and connect to it using RDP client. Make sure that the RDS CAL has been issued successfully using the Remote Desktop Licensing Manager.

rds license issued

If the RDS CAL is not received, check if there is an event in the Event Viewer:

Event ID: 1130
Source: TerminalServices-RemoteConnectionManager The Remote Desktop Session Host server does not have a Remote Desktop license server specified. To specify a license server for the Remote Desktop Session Host server, use the Remote Desktop Session Host Configuration tool.

Event ID : 1130 Source : TerminalServices-RemoteConnectionManager

Using this PowerShell command, make sure if the RDS licensing server is set:

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

wmi GetSpecifiedLicenseServerList

As you can see, the RDS licensing server is not set (SpecifiedLSList is empty). Force set the RD licensing server with the following command:

$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("lon-rdslic.woshub.com")

You can also set the license server name and license type using the Group Policy GPO. If you are using Local GPO, run the gpedit.msc and go to section Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing. Set the following options:

  • Use the specified Remote Desktop license servers
  • Set the Remote licensing mode

configure rds licensing settings via gpo

The RDS host will now be able to obtain licenses from the RDS Licensing server and issue them to your RDP users.

13 comments
6
Facebook Twitter Google + Pinterest
previous post
How to Create and Manage Distribution Groups (Lists) in Exchange?
next post
Using PowerShell Invoke-Command to Run Scripts on Remote Computers

Related Reading

How to Connect VPN Before Windows Logon

November 14, 2023

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

November 7, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

13 comments

Tony March 30, 2016 - 9:10 am

Hi, Great run through.
I had this issue and this worked for me, however I am in the process of moving to a new licensing server and although this works when initially defining a licensing server when I try and update the SetSpecifiedLicenseServerList parameter with the new server details
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("My-New-Server.Name ")
I get the following error. Do you need to run a different command to update?
Exception calling "SetSpecifiedLicenseServerList" : "Invalid operation "
At line:1 char:1
+ $obj.SetSpecifiedLicenseServerList("My-New-Server.Name")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WMIMethodException
 
Any help would be appreciated.
Tony

Reply
admin April 4, 2016 - 10:03 am

Hi,

Are you running this command in elevated mode on the server with RDSH role?

Reply
Dave January 6, 2017 - 3:56 pm

I tried the allow full permissions of grace period that is detailed above but got access denied. I went into same security > advanced option for grace period, changed owner to admin account and then was able to delete the timebomb entry, rebooted and now have 120 days to figure out why the license won’t load (but that’s another story).

Great detail that helped me out.

Reply
Richard January 12, 2017 - 2:53 am

THANK-YOU! This worked for me also.

Reply
Flo January 17, 2017 - 4:46 pm

Where did you set the license server?

On the RDS Server for shure.

…but did you also set it on the license server itself?

I´m asking beacause my RDS Server has the license Server set but nevertheless is in grace period. Also after i deleted the timebomb;) key and rebooted.

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList(“lon-rdslic.woshub.com”)

Reply
dg54321 December 18, 2018 - 5:15 am

Extremely helpful! Thank you very much for this detailed explanation of this issue and the resolution. Helped me with a W2012R2 server that had this sudden issue out of the blue.

Reply
Paul Winston June 19, 2019 - 4:29 pm

I am locked out of the server by this
As it is a remote vps I can’t get in to licence it at all
What do I do

Reply
admin July 8, 2019 - 5:11 am

Try to connect Windows VPS console using the “Mstsc.exe /Console” switch.

Reply
Sunil May 29, 2020 - 5:17 am

If i run the powershell or CMD command (elavated) then I get daysleft = 0.

Reply
Sunil May 29, 2020 - 5:20 am

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

If i run above CMD command then I get daysleft = 0.

I would ike to fix the problem, as i dont to come in one day, to find that the expiry starts to ‘work’ and my users cant open their apps.please help

Reply
Zadiky November 11, 2021 - 12:34 pm

I followed through everything and it worked for me, thank you very much for this , i realized some viewers didn’t finished the last part

Thank you once more

Reply
Ricky January 6, 2022 - 1:55 am

Hi followed closely, but my error is a bit different : “Broker Service is unable to validate informations in RDP file” or something like that

any suggestions…

all my licences where purchased long time ago, but mos likely badly installed at first.

can the time bomb can provoque this error, cause iniitially the message was no server to deliver license is available

Thanks

Reply
Dave May 2, 2022 - 6:36 am

This worked! Removed the grace period reg key and reboot now License manager is showing clients using my CALS.

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
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11
  • How to Restore Deleted EFI System Partition in Windows
  • Network Computers are not Showing Up in Windows 10/11
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC
  • How to Sign an Unsigned Device Driver in Windows
  • How to Download APPX File from Microsoft Store for Offline Installation?
Footer Logo

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


Back To Top