I tried to use Remote Desktop Protocol (RDP) to connect to an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance. However, I received the "The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator" error message.
Short description
If the Remote Desktop Services role that's on your EC2 Windows instance has issues with its host settings, then you receive the following error message:
"The remote session was disconnected because there are no Remote Desktop License Servers available to provide a license. Please contact the server administrator."
To troubleshoot this issue for instances where you run two or fewer concurrent RDP sessions, uninstall Remote Desktop Services. To run more than two concurrent RDP sessions, you must purchase Remote Desktop Services client access licenses.
Resolution
Uninstall Remote Desktop Services
To automatically remove Remote Desktop Services, complete the following steps:
-
Run the following command to open the Remote Desktop Services client and connect to the Windows server:
mstsc /admin
-
Run the following command as an administrator to uninstall the Remote Desktop Services client:
Uninstall-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -confirm
-
Reboot your machine.
Or, to manually remove Remote Desktop Services with Server Manager, complete the following steps:
- Choose the Start menu, and then enter Server Manager.
- Choose Server Manager, and then choose Manage.
- Choose Remove Role and Features, and then choose Next.
- Select your server.
- Choose Server Roles, and then clear Remote Desktop Services.
- Choose Remove.
- Choose Next.
- Choose Close.
- Choose Yes to restart your machine.
If you still can't use RDP to connect to your instance, then see How do I troubleshoot RDP connection issues with my EC2 Windows instance?
Purchase Remote Desktop Services client access licenses
Remote Desktop Services has a licensing grace period of 120 days. After the grace period expires, you must purchase Remote Desktop Services client access licenses to allow more than two concurrent RDP user sessions.
For help with client access licenses purchase or installation, contact your value-added reseller or Microsoft partner in the AWS Partner Network.
If you purchased client access licenses and still receive the "remote session was disconnected" error, then your instance might not be able to reach the server. To troubleshoot this issue, see Cannot connect to Remote Desktop Services because no Remote Desktop Licensing servers are available on the Microsoft website.
Related information
Connect to your Windows instance using RDP
License Remote Desktop Services with client access licenses (CALs) on the Microsoft website
mstsc on the Microsoft website
RDP displays a black screen instead of the desktop