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 :
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 :
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 :
Another error was,
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:
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
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.
- Open an elevated Windows PowerShell prompt
- Type the following command on the PS prompt and press Enter:$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
- Run the following command to set the licensing mode:
Note: Value = 2 for Per device, Value = 4 for Per User$obj.ChangeMode(value)
- Run the following command to replace the machine name with License Server:$obj.SetSpecifiedLicenseServerList(“servername”)
- Run the following command to verify the settings that are configured using above mentioned steps:$obj.GetSpecifiedLicenseServerList()
The result will be
The RD Licensing Manager will also display the RDS per user details.
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