I recently setup a backend RDP server so that I could test our remote services. I went through the installation process and installed my RDP license on the server successfully. The problem was that I was not getting an error when logging onto the server locally to check the status of the RDP Server:
I also had Events within Event Viewer:
Log Name: System
Date: 6/24/2020 3:44:16 PM
Event ID: 18
Task Category: None
The Remote Desktop license server “SRV2016-02” has not been activated and therefore will only issue temporary licenses. To issue permanent licenses, the Remote Desktop license server must be activated.
Usually, this error appears as a notification popup in the bottom right-hand corner of the screen saying:
Remote Desktop licensing mode is not configured
Remote Desktop Services will stop working in xx days. On the RD Connection Broker server, use Server Manager to specify the Remote Desktop licensing mode and the license server.
And when you click on this notification popup, it doesn’t redirect you anywhere and it gets simply disappeared which is a quite frustrating situation.
I thought I had this set properly, but the RDP Licensing Diagnoser application told me that I needed to choose the licensing configuration to distribute for Per Device OR Per User. The licenses I installed were per device so I did some research.
I found out that this had to be configured via the Registry, PowerShell, or could be configured through GPO. I chose to do GPO since that would always apply on my servers in my domain.
How To configure the Remote Desktop Licensing Mode through the Registry
Here’s how to change the licensing mode for Remote Desktop session host using the registry editor and get rid of the error message Remote Desktop Services will stop working in xx days:
At first, press Windows + R keys together and then type regedit in the Run dialog box and press Enter key.
Next, in the left pane of the Registry Editor, navigate to the following registry key:
HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core
Next in the right pane, double-click on the LicensingMode to edit its value and then change the Value data according to your requirement:
Set the Value data 2 for Per Device RDS licensing mode
Set the Value data 4 for Per User RDS licensing mode
Finally, click on the OK button to save the changes.
Now, restart your computer and check if the Remote Desktop licensing mode is not configured issue on Windows Server has been resolved or not.
Once you changed the licensing mode, now everything will be reported accurately and the Remote Desktop session host will recognize the licensing configuration.
How To configure the Remote Desktop Licensing Mode through a Group Policy Object (GPO)
First Logon to a machines that has Group Policy Tools Installed, press Windows + R keys together, type gpedit.msc, and press Enter key.
Within Group Policy Editor, create a new GPO and link it to the level that you need to link it to. (In my case, the domain level.) Navigate to:
Computer Configuration > Policies > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.
Next, double-click on the “Use the specified Remote Desktop license servers” setting and then select Enabled option. Finally, enter the names of the license servers (host name or IP address) and then click on the OK button.
Similarly, double-click on the “Set the Remote Desktop licensing mode” setting and then select Enabled option. Finally, set the licensing mode (Per Device or Per User) and then click on the OK button.
Once all these changes are done, close Group Policy Editor, go to the RDP Licensing Server and run a gpupdate /force to refresh Group Policy.
Now, when you open the Remote Desktop Licensing Diagnoser, you shouldn’t see any errors like the remote desktop licensing mode is not configured on windows server or any kind of issues regarding your licenses.
How To configure Remote Desktop Licensing Mode through PowerShell
You can also use PowerShell to set the Licensing Mode via the Set-RDLicenseConfiguration cmdlet from the RemoteDesktop PowerShell Module which is installed with Remote Desktop Services:
Set-RDLicenseConfiguration -LicenseServer @("srv2016-01.ldlnet.net","srv2016-02.ldlnet.net") -Mode PerDevice -ConnectionBroker "srv2016-01.ldlnet.net"