Skip to content

How do I resolve the "remote session was disconnected" error that I receive when I use RDP to connect to an Amazon EC2 Windows instance?

3 minute read
0

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:

  1. Run the following command to open the Remote Desktop Services client and connect to the Windows server:

    mstsc /admin
  2. Run the following command as an administrator to uninstall the Remote Desktop Services client:

    Uninstall-WindowsFeature -name Remote-Desktop-Services -includemanagementtools -confirm
  3. Reboot your machine.

Or, to manually remove Remote Desktop Services with Server Manager, complete the following steps:

  1. Choose the Start menu, and then enter Server Manager.
  2. Choose Server Manager, and then choose Manage.
  3. Choose Remove Role and Features, and then choose Next.
  4. Select your server.
  5. Choose Server Roles, and then clear Remote Desktop Services.
  6. Choose Remove.
  7. Choose Next.
  8. Choose Close.
  9. 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

AWS OFFICIALUpdated 6 months ago