There are no client licenses for remote desktop connection. Setting up an RDP licensing server. Setting up a license server

Good afternoon, dear readers and subscribers, last time we solved the problem that search does not work in outlook 2013. Today we will not touch Microsoft office products, but will analyze an error in the operation of an RDP connection to a terminal server running Windows Server 2012 R2. An employee tries to connect to a remote desktop, and instead of his usual desktop environment, he receives the error: The remote session has been disconnected because the Remote Desktop Client License stored on this computer has been changed. And as a result, it kicks the user, preventing him from logging in via a remote connection. Below we will look at how to deal with this.

Reasons for the error: something stored on this computer has been changed

Let's figure out why this problem is happening to you, these are echoes of another error: Error: The remote session is disabled because there are no available remote desktop licensing servers, at that time we ran out of licenses on the terminal server for client connections and, as a result, we cannot were able to get in. As a result of this, in some cases you may experience a problem in the Windows registry leading to an error that the CAL stored on this computer has been changed.

In most cases, the error: The remote session is disabled because the Remote Desktop CAL stored on this computer has been changed, pops up on client operating systems such as Windows 10 or 8.1

I will describe how I fixed this on Windows 10, but this will work for any version of the OS. Open the Windows Registry Editor.

Go to the registry branch

HKEY_LOCAL_MACHINE\Software\Microsoft\MSLicensin

And completely delete the entire section via right click.

We confirm the deletion. Then we restart the computer.

Once you've rebooted, press WIN+R and type mstsc /admin to open a remote desktop window as administrator.

We can all try to connect to your terminal server.

If it doesn’t help, then try creating a bat file and executing it, below is the content.

Const HKLM = &H80000002
Const MSLicensingStore = "Software\Microsoft\MSLicensing\Store\"
Set oReg = GetObject("winmgmts:\\.\root\default:StdRegProv")
RetVal = oReg.EnumKey(HKLM, MSLicensingStore, RegKeys)
If RetVal<>0 Then
MsgBox("Could not read registry hive " & MSLicensingStore)
WScript.Quit
End If
If IsArray(RegKeys) Then
For Each Key In RegKeys
KeyName = MSLicensingStore & Key
If InStr(1, UCase(KeyName), "LICENSE") > 0 Then
RetVal = oReg.DeleteKey(HKLM, KeyName)
End If
Next
End If

Also, if you have a terminal server on Windows 7, then check the operation of the module; you may have to reinstall it.

All versions of Windows, starting with XP, have a standard RDP (Remote Desktop Protocol) client that is used to connect to the Remote Desktop Service. Sometimes, when connecting to a terminal server via a remote desktop client, an error occurs: “the remote session was disconnected because there are no client licenses.”

This message can occur in two cases:

  1. The terminal server is not configured with a license server for Remote Desktop Services.
  2. The licensing server has not allocated client access licenses (CALs).

Let's take a closer look at both cases.

Setting up a license server

The error often occurs after some time in already configured connections, after 120 or 180 days. It is likely that when the connection was created, the client was issued a temporary license for a given period of time. To obtain a new temporary license, you must delete information about the expired license from the registry on the client machine. For this:

  1. Press Win+R and run the regedit command.
  2. Make a backup of the registry.
  3. Click File → Export → Range (Entire Registry) → Give a file name → Save.
  4. Open the branch: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing and delete MSLicensing.
  5. Then open a remote desktop connection with administrator rights. When opened, the new license will be registered in the registry.

Advice! To configure a profile for connecting client machines to a remote network, read the instructions for the Connection Manager Administration Kit (CMAK) snap-in.

Checking CAL licenses

It is possible that the Terminal Server licensing server has run out of licenses. To do this, just wait until the license becomes available, or purchase and activate the required number of CAL licenses.

To check available and occupied CALs, use Terminal Server Licensing on server Windows:

  1. Open Start → Administrative Tools → Remote Desktop Services → Remote Desktop Licensing Manager.
  2. Select your license server.
  3. In the window that opens, click “Action” → “Create report”.

The report will display the number of Remote Desktop Services CALs per user that:

  • installed on the licensing server;
  • issued by the licensing server based on the specified report scope.

Advice! You can optimize Windows 10 client by disabling unnecessary services. You can find a list of services in the article:

Remote desktop licenses are one of the most common services that are purchased separately for a virtual server. You can easily set up Remote Desktop Services client licenses yourself and take advantage of a free trial period of 120 days, only after which you can start paying for the exact number of licenses that you actually need.

Open the Server Manager window (it opens by default when you start the server) and select Add roles and features.






For correct installation and further successful configuration of the licensing server, Active Directory Domain Services must be installed on your server.

When you select the “Active Directory Domain Services” checkbox, a window will open for additional necessary services that will be installed; they must be accepted by clicking “Add Features”.

Then click “Next >” several times

Once the installation is complete, click Close and return to the Server Manager window to configure the Active Directory Domain Services installation.



In the window that opens, select “Add a new forest” and specify the name of the root domain (Root domain name) - this can be a completely arbitrary domain name, the existence of which is not required, for example, “test.domain”.

After clicking “Next >” you will be asked to create and specify a recovery password.

Then click “Next >” several times in subsequent steps and finally click “Install”.

Once the installation is complete, the server will automatically reboot.

After the reboot, we can proceed directly to installing the RDP remote connection licensing server. To do this, in the “Server Manager” window, select “Add roles and features” again and in the window that opens, “Remote Desktop Services installation”.

Then select “Session-based desktop deployment”

In further windows that open, simply click “Next >” until you reach the last one, where by selecting “Restart the destination server automatically if required”, click the “Deploy” button.

The server will be rebooted during installation. After rebooting, when connecting, you will see the following window, which after installation is complete, simply close.

After installation, the “Remote Desktop Services” tab will appear in the “Server Manager” panel.

By clicking on the “Remote Desktop Services” tab, you will see the RDP remote connection licensing server settings control panel.



In the next step, you will be asked to enter the name of the new certificate, which will be used to encrypt the connection between clients connecting via RDP and the server.

Then click on the “Add” button and wait until the system configuration is completed. When finished, the window will close automatically and only one icon will remain in the form of a green plus with the inscription “RD Licensing”



By clicking it, also follow the steps of the setup wizard:

In the next step, click on the final “Add” button and wait until the configuration is completed. When finished, the window will also close automatically.

Now we have installed the license management service directly and the “Remote Desktop Licensing Manager” application has become available to you (you can find it by opening all applications in the “Start” menu, or through the search bar there). Launch this application.

Select the line of your server (the only one in the screenshot), right-click and select “Review Configuration...”

Click on the button at the top “Change Scope...” of the window that opens and select “The forest”.



After successful addition, in the same configuration window, click the button below “Add to Group”. After confirming this action, the notification windows will close and the “Add to Group” button will disappear. Click the "OK" button below to close the window.

Select your server line again, right-click and select “Activate Server”.

In the window that opens, simply follow the steps of the setup wizard, filling out the required fields (full name, organization name, country, email, etc.).

At the last step, if you do not have your own licenses, uncheck “Start Install Licenses Wizard now” and click “Finish”.

After this, restart your server.

After the reboot, you will see a notification that the licenses are not installed and you have another 119 days before they must be purchased and installed on your server.

The setup and configuration does not end here. Return to the Server Manager window, go to the Remote Desktop Services tab and select TASKS -> Edit Deployment Properties.

In the window that opens, select “RD Licensing”. Here you need to select the licensing method for remote connections: per user (how many users can simultaneously connect to the server) or per device (how many different devices can simultaneously connect to the server). Once selected, click the “Apply” button and go to the “Certificates” tab.

Any Windows operating system has a standard RDP client that allows you to view and work from your computer, even if the user is behind another PC. Sometimes a connection error occurs when connecting to the RDP client. This error can occur in two cases:

  • The remote session was disconnected because CALs are missing.
  • The client cannot be opened because the server with licenses is not configured.

In this article we will look in detail at how to fix these two errors.

The Remote Desktop Licensing Server is unavailable

To activate a user or device on the server, you must provide a license for the RDP client. To obtain a license, the server sends a request on behalf of the client to obtain a license. If the server has a free license, it is sent to the client. After which it can connect to the session node.

Errors may occur when connecting to the server; the reason is that the licensing settings for the server are incorrect or the grace period for licensing remote desktops has expired.

How to solve the problem:

Remote Desktop Client License missing

This error appears in already configured systems. As a rule, upon connection, a temporary license is issued for 120 or 180 days. After this period, the client encounters errors in the system. To correct the error, you must purchase a new temporary license. But to do this, you need to erase the old one from the program registry.

It is worth noting: before you delete a branch, it must be exported. This is necessary to be able to restore settings.

To restore registry settings, you must:

  • Find file *. reg with the previous version.
  • Double click on the file and confirm import.

You can also restore the original data from the registry itself. To do this, select File->Import and specify the previously created file.

Sometimes, after deleting a registry key, a new error may appear, indicating that the remote computer disconnected the session due to an error in the license protocol.

To solve the problem, you need to run the RDP client from your account or from the command line. In both cases, you must log in as an administrator.

If User Account Control is working, it must be disabled:

  • Open Start - Control Panel - User Accounts and Family Safety - User Accounts.
  • Now you need to change the record control settings. To do this, there will be a similar link at the bottom of the page.
  • Click on OK and restart the computer.

These instructions are relevant for computers with Windows 7. There are users who still have Windows Vista, for them there are no special changes in the instructions. The only difference is a different name for the disabled option (Use accounts to protect your computer). We also click on OK and restart the computer.

After performing these steps, the problem should be resolved.

Conclusions on the article

A remote computer is created so that the user can work on it even from another device. This model is mainly used for organizational computers. For home use there is no point in connecting such a system.

A remote session can disconnect for two reasons:

  • Lack of licenses.
  • The remote session was disconnected because there are no servers available for licensing.

To ensure that the server has licenses, you must perform the following steps:

  • Go to the RDP client manager.
  • Click Actions - Create reports. All information on available permissions for use will appear in the window.

The most effective method to combat such an error is to delete one branch in the registry. But first you need to check the server itself.

When using RDP on a computer running the Windows operating system, for some reason you may receive an error indicating that there are no remote desktop client licenses. Later in the article we will talk about the reasons and methods for eliminating such a message.

The error in question occurs regardless of the OS version due to the lack of licenses on the client computer. Sometimes the same message can be seen due to the inability to obtain a new license because the old one was cached.

Method 1: Deleting registry branches

The first method is to delete certain registry keys associated with RDP licenses. Thanks to this approach, you can update temporary licenses and at the same time get rid of problems with caching outdated records.

  1. On your keyboard, use the keyboard shortcut "Win+R" and enter the following query.
  2. In the registry, expand the branch "HKEY_LOCAL_MACHINE" and switch to the section "SOFTWARE".
  3. On a 32-bit OS, go to the folder "Microsoft" and scroll down to the directory "MS Licensing".
  4. Right-click on the line with the specified folder and select "Delete".

    Note: Don't forget to make a copy of the keys you change.

  5. The deletion process must be confirmed manually.
  6. In the case of a 64-bit OS, the only difference is that after going to the section "SOFTWARE", you need to further expand the directory "Wow6432Node". The remaining steps are completely similar to those described above.
  7. Before proceeding to launch, restart your computer.