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

One of our clients had recently configured Remote Desktop Services on a Windows Server 2012 R2 OS. Since it was a small infrastructure, all the remote desktop roles were installed on the single server. The RDP CALs were installed on the Remote Desktop Licensing Manager console as well.

However, every time the client tries to RDP to the RDP server, it shows the below error :

RDP1

 

Other than this, in the RD Licensing Manager, the RDS per user CAL information was not being displayed. When accessing the Remote Desktop Services Overview option from Server Manager, all it show is :

RDP2

 

At the same time, when trying to find the configuration details from the PowerShell by executing the command Get-RDLicenseConfiguration, you get

 

Upon checking the event log errors and the Remote Desktop License Diagnoser some errors were displayed. Once of the error reported as follows :

RDP4

Another error was,

RDP5

The second error was resolved by deleting the binary key L$RTMTIMEBOMB from the GracePeriod registry in the location HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod.

Note: In order to delete this key, you will have to take full permission of the GracePeriod registry key or you may receive an error as shown below:

RDP6

You may have to reboot your server as well. However, the issue persisted even after performing the above steps. In order to check whether the licensing server is configured you can execute the below command in PowerShell

$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting

$obj.GetSpecifiedLicenseServerList()

RDP7

As you can see, in the above image the SpecifiedLSList is shown as empty. Run the below commands to enable the per user mode and also to manually specify the LicenseServer.

  1. Open an elevated Windows PowerShell prompt
  2. Type the following command on the PS prompt and press Enter:$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
  3. Run the following command to set the licensing mode:
    Note: Value = 2 for Per device, Value = 4 for Per User$obj.ChangeMode(value)
  4. Run the following command to replace the machine name with License Server:$obj.SetSpecifiedLicenseServerList(“servername”)
  5. Run the following command to verify the settings that are configured using above mentioned steps:$obj.GetSpecifiedLicenseServerList()

The result will be

RDP8

The RD Licensing Manager will also display the RDS per user details.

RDP

The RDP to the server worked as a charm too..

 

Reference : http://social.technet.microsoft.com/Forums/windowsserver/en-US/ebc032e2-ab2d-4acd-aef7-28ed548be569/how-to-set-up-remote-desktop-licensing-mode-in-windows-server-2012?forum=winserverTS

Advertisements

3 comments on “Error “The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license” !!

  1. Pingback: Error “The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license” !! | Process Studio

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s