Remote Desktop Session Host (RD Session Host) enables a server to host RemoteApp programs or session-based desktops. Users can connect to RD Session Host servers in a session collection to run programs, save files, and use resources on those servers.
We recently solved a known issue related to the licenses required to connect to a Remote Desktop Session Host server or a virtual desktop. The error description reads: “Licensing mode for the Remote Desktop Session Host is not configured.”
We developed a fix for the licensing issue with RDS on server 2012r2. We found some solutions for this known bug but none that actually worked. Incidentally, deleting the GracePeriod key like many forums said didn’t fix the problem.
To fix the problem, run the following commands in powershell to set the licensing server properly on the rd session host using the WMI CIM provider:
$obj = gwmi -namespace “Root/CIMV2/TerminalServices” Win32_TerminalServiceSetting
Then, go into the registry and manually set the licensing mode:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\LicensingMode
You need to change the DWORD to 2 for Per Device or 4 for Per User.
Next, reboot the system. The changes made previously will report everything properly and the RDS host will now recognize the licensing configuration.