When trying to configure a new host in the RDS farm running Windows Server 2012 R2, I encountered the following warning popup message in the system tray:
Remote Desktop Service will stop working in 104 days.
Obviously, RDS Host is running in the licensing grace period (I have already described a similar problem, but the situation is a bit different here).
For more accurate diagnostics of the problem, you need to run the RD Licensing Diagnoser. Its window shows the following error:
As you can see, there are no licenses available to clients, since the licensing mode is not set.
It means that the administrator has not selected the RDS Licensing Server and/or the licensing mode. It should be done even if the licensing type has already been specified when deploying the RDS host.
You can check whether the license server is set using the following PowerShell commands:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
If the lRDS icense server is not set, you can specify it using this command:
There are several methods to force set the RDS licensing mode.
Using the registry:
In the registry key HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core change the value of the DWORD parameter with the name LicensingMode from 5 to:
- 2 – if Per Device RDS licensing mode is used;
- 4 – if Per User licensing is used.
After you have made the changes, restart your RDSH server.
You can also configure the RDS license server parameters using GPO (a local or a domain policy). Suppose, the server is not in the domain. Let’s use the local editor gpedit.msc. Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing.
We need two policies:
- Use the specified Remote Desktop license servers – enable the policy and specify the RDS license server address. If the license server is running on the same server, type 127.0.0.1;
- Set the Remote Desktop licensing mode – select the licensing mode. In our case, it is Per User.
After restarting your server, open the RD Licensing Diagnoser and check the number of available licenses and the licensing mode you have selected.