One of the clients 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 CAL had been activated.
When a user tries to connect to the terminal server, the following error appears:
Please contact the server administrator.
In this case, the server registers this error:
Source : TerminalServices-RemoteConnectionManagerThe 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.
Using Server Manager, let’s make sure that the Remote Desktop license server is specified in the RDSH configuration:
You can also check the license server configuration in PowerShell:
Get-RDLicenseConfiguration
As we can see, the server is specified and PerUser licensing mode is used.
RD Licensing Diagnoser also doesn’t show any problems with RD server configuration and licenses.
Using RD Licensing Manager (licmgr.exe), make sure that there are free licenses on the server, but on some reason they are not issued to the users (Issued = 0).
The further search in the event log allowed to detect the following event:
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.
It appears that the RDSH server decided that the grace period of using the terminal server is over (120 days), and either it has to be extended or the RDS licenses have to be activated on a full-version server. It seems to be an RDS bug in Windows Server 2012.
You can find out the current value of RDS Grace Period with this command:
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TerminalServiceSetting WHERE (__CLASS !="") CALL GetGracePeriodDays
To solve this problem, you have to remove the key that determines the grace period of licensing on the RDS server. The date that determines the grace period for the server is stored in L$RTMTIMEBOMB key (quite a funny name — TIME BOMB …. ; ) located in the following registry branch:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
You have to remove L$RTMTIMEBOMB key. However, the administrator doesn’t have relevant privileges to do it.
To remove this key, grant your account the privileges of the branch owner, and then the right to make any changes.
Now, right-click L$RTMTIMEBOMB key and delete it.
Restart your server, and connect to it using RDP client. Make sure that the license has been issued successfully in Remote Desktop Licensing Manager.
However, I didn’t have it done at once. Using this PowerShell command, make sure if the licensing server is set:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.GetSpecifiedLicenseServerList()
As you can see, the licensing server is not set (SpecifiedLSList is empty). Set the RD licensing server with the following command.
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj.SetSpecifiedLicenseServerList("lon-rdslic.woshub.com")
After it had been done, the server started issuing licenses to RD clients.
5 comments
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
Hi,
Are you running this command in elevated mode on the server with RDSH role?
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.
THANK-YOU! This worked for me also.
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”)