The “ Remote Desktop Licensing mode is not configured” error persists even if you specify the correct license type and RDS license server name.
If the ports are closed on the local Windows Defender Firewall, you can open the ports using the PowerShell cmdlets from the NetSecurity module.Īlso note that if, for example, Windows Server 2012 R2 and CAL for RDS 2012 R2 are installed on the RD Licensing Server, you won’t be able to install RDS CAL licenses for Windows Server 2016/2019. You can check for open ports using the Test-NetConnection cmdlet. If a firewall is used on your network, you must open the following ports from the RDSH host to the RDS licensing server – TCP:135, UDP:137, UDP:138, TCP:139, TCP:445, TCP:49152-65535 (RPC range). Go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Licensing. If your RDS server is in a workgroup (not joined to the Active Directory domain), use the local Group Policy Editor gpedit.msc. You can also configure the RDS license server parameters using GPO (a local or a domain policy). Set-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\" -Name "LicensingMode" -Value $RDSCALModeĪfter you have made the changes, restart your RDSH server.
New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" -Name SpecifiedLicenseServers -Value $RDSlicServer -PropertyType "MultiString" New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\TermService\Parameters\LicenseServers" # Set the server name and type of licensing in the registry # Specify the RDS licensing type: 2 - Per Device CAL, 4 - Per User CAL You can change the registry setting manually through regedit.exe or the following PowerShell commands from the registry management module:
2 – if Per Device RDS licensing mode is used.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: $obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
You can check whether the RDS license server is set using the following PowerShell commands: It should be done even if the licensing type has already been specified when deploying the RDS host (Configure the deployment -> RD Licensing -> Select the Remote Desktop licensing mode). It means that the administrator did not specify the RDS Licensing Server and/or the licensing mode. The Remote Desktop Session Host server is within its grace period, but the Session Host server has not been configured with any license server.Īs you can see, there are no licenses available to clients, since the licensing mode is not set. Licensing mode for the Remote Desktop Session Host is not configured. Its window shows the following error: Licenses are not available for the Remote Desktop Session Host server, and RD Licensing Diagnoser has identified licensing problem for the RD Session Host server. I have already described a similar problem in the article about the RDS error “ The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license”, but the situation is a bit different here.įor more accurate diagnostic of the problem, you need to run the RD Licensing Diagnoser tool- lsdiag.msc (Administrative Tools -> Remote Desktop Services -> RD Licensing Diagnoser).