Accessing remote desktops and configuring them is a common administrative task in organizations, and it has taken greater importance in the current work-from-anywhere culture. However, accessing remote desktops is not always a straightforward task as it could require licenses and can throw up many errors in case of misconfigurations. The error message is often not detailed enough to give you the cause of the problem, so fixing it can take up a ton of time and effort, not to mention the frustrations that come with it. One such critical error that’s not self-explanatory is the “remote desktop licensing mode is not configured” error. In this article, let’s learn all about this error, its causes, and how to fix it.
But before that, a touch on the basics.
What is remote desktop licensing?
Every device or user that wants to connect to a remote desktop session host requires a Client Access License (CAL), to help you install and track licenses across different computers. This CAL also helps with streamlining access and ensures that no unauthorized system can connect to a remote host.
When a host or device tries to connect to a remote desktop session (RDS) Host server, it checks the configuration to see if a CAL is required. If yes, the RDS host server requests a CAL from the RD license server. Next, the server checks if the CAL is valid and issues the same to the client.
Using this CAL, the client connects to the RD Session host server and, through it, to the required remote desktop.
Many CAL versions apply to different session host versions. For example, the 2008 and 2008 R2 session hosts are compatible with RDS 2008 R2 CAL, RDS 2012 CAL, RDS 2016 CAL, and RDS 2019 CAL, while the 2012 session host is compatible with RDS 2012 CAL and later versions. So, check the version compatibility for your CAL.
Microsoft offers a 120-day grace period, and no license is required during this time. After this time ends, a client needs a CAL to log into a remote desktop through the RD Session Host server.
Now that you know what remote desktop licensing is, let’s jump into the error.
What is the ‘remote desktop licensing mode is not configured’ error?
What is the “remote desktop licensing mode is not configured” error? What’s the cause of this error and how do you fix it?
Let’s find out.
Microsoft’s grace period
Sometimes, you’ll get a pop-up in the system tray that tells you that the remote desktop service will stop working in x days. When you see this error, the fix is straightforward.
As mentioned earlier, Microsoft gives a 120-day grace period, so this notification is a reminder to buy the license if you want to continue beyond this grace period. This is just a notification and doesn’t stop you from accessing the remote desktop service.
However, if you go beyond the 120-day grace period, you can’t access the service. That’s when the notification will convert into an error, and you have to buy a license to continue accessing.
Though this is the most common cause of the “remote desktop licensing mode is not configured” error, there can also be other reasons/causes.
But identifying them is not easy as the error message will not be so intuitive, and that’s when you can use diagnostic tools like the RD Licensing Diagnoser.
To use this tool, go to Administrative Tools -> Remote Desktop Services -> RD Licensing Diagnoser. This tool’s messages can give a better idea of the cause of the “remote desktop licensing mode is not configured” error.
As soon as you open this tool, you may get an error message that licenses are not available for the Remote Desktop Session host server.
What this means is that you have to configure the licensing mode of the Session Host server. Remember, you can get this message even during the grace period if you haven’t configured the host server.
To double-check if the licensing is configured or not, use the PowerShell cmdlet:
$object = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting $object.GetSpecifiedLicenseServerList()
Some people may prefer to use the cmdlet Get-RDLicenseConfiguration, but this may not show the data you want. For this reason, use the GetSpecifiedLicenSeserverList() method above.
There are many ways to configure the licensing mode, and here are your choices.
Use PowerShell cmdlet
To fix this issue, configure the license with the following cmdlet:
Use the registry
You can also configure the licensing using the registry.
Go to HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core and change the LicensingMode parameter value from 5 to 2 if you’re using the per-device licensing mode or to 4 if you’re using the per-user licensing mode.
Use the local or a domain policy
Check if your RDS server is a part of a workgroup that’s not connected to the Active Directory domain. If yes, use the local Group Policy Editor to configure the RDS license.
- Go to Run (Windows + R key) and type gpedit.msc to open the Group Policy Editor.
- Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing.
- Navigate through the policy list, find and right-click “Use the specified Remote Desktop license servers”. Select Properties.
- Check if the “Use the specified Remote Desktop license servers” is enabled, If not, enable the policy and mention the RDS license server address. If you have more than one, use commas to separate them.
- Next, set the licensing mode. Navigate to the “Set the Remote Desktop Licensing Mode,” right-click, and select Properties.
- Check if the “Enabled” radio button is on. Else, choose this radio button.
- Navigate to the “specify the licensing mode for the RD session host server” and choose the “per user” or “per device,” according to your license mode.
- Save the settings and exit.
Restart the device
Finally, restart the server and check if you’re able to access the remote device.
Check the firewall
Firewalls can block the requests and prevent you from accessing the remote system. To check if the firewall is the cause, disable it for a few minutes, and try connecting.
While disabling the firewall is not a permanent solution, you can use it for a temporary check.
For a permanent fix, open the below-mentioned ports to connect from the RDSH host to the RDS licensing server.
- UDP — 137 and 138.
- TCP — 135, 137, 139, and anything in the RPC range.
The RDS CAL license is not backward-compatible, so check if your license is compatible with your Windows Server. Often, this is a simple but overlooked problem.
If your CAL is of a higher version than your server, consider upgrading your device or buy a CAL that’s compatible with the version you have.
Use the appropriate type of RDS CAL
Sometimes, the wrong type of CAL for your RDS environment can throw the “remote desktop licensing mode is not configured” error.
In general, you can use both per-user and per-device CALs for domain-joined servers. On the other hand, if you use only workgroup servers, use the per-device CALs only.
With this in mind, check if you’re using the appropriate CAL for connecting.
‘Remote desktop licensing’ error: Sometimes configuration error, sometimes not
Most times, the “remote desktop licensing mode is not configured” error is due to configuration issues, though sometimes it can also be due to firewalls and antivirus software.
We hope the configuration mentioned above settings will remove this error for you.
Please let us know in the comments section if any other solution has worked for you.
Featured image: Designed by Freepik