Situation: When accessing a new remote desktop server, you may have a problem to establish the connection with this s message: The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license.
Resolution 1: Make sure you install the RDP license. If you want to access Remote Desktop for administering session without license, try this command: mstsc /V:servername /admin.
Resolution 2: If you have RDS deployment, you must create a session collection and make your RDSH server part of the collection.
Resolution 3: If this is a standalone RDSH server (i.e. you didn’t create an RDS deployment via Add roles and features), you can configure the licensing mode and licensing server name using group policy. For example, you could use gpedit.msc and configure the below settings:
Computer Configuration\ Administrative Templates\ Windows Components\ Remote Desktop Services\ Remote Desktop Session Host\ Licensing
Use the specified Remote Desktop license server Enabled
Set the Remote Desktop licensing mode Enabled
Resolution 4: In Server Manager — RDS — Overview — Deployment Overview — Tasks — Edit Deployment Properties — RD Licensing tab, did you set the Licensing mode and add the FQDN of your RD Licensing server?
Please refer to this article:
Clients can’t connect and see No licenses available error | Microsoft …docs.microsoft.com › … › Known issues
Jul 24, 2019 … The remote session was disconnected because there are no Remote DesktopLicense Servers available to provide a license. In this case …