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

Configuring Event Viewer Log Size on Windows

May 24, 2023

How to Detect Who Changed the File/Folder NTFS...

May 24, 2023

Enable Single Sign-On (SSO) Authentication on RDS Windows...

May 23, 2023

Allow Non-admin Users RDP Access to Windows Server

May 22, 2023

How to Create, Change, and Remove Local Users...

May 17, 2023

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

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Allow Multiple RDP Sessions in Windows 10 and 11?
  • 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
  • How to Create a Wi-Fi Hotspot on your Windows PC?
  • Updating List of Trusted Root Certificates in Windows
  • How to Sign an Unsigned Device Driver in Windows?
Footer Logo

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


Back To Top