<a class="button is-primary" href="https://vsa.services.microsoft.com/v1.0/?partnerId=7d74cf73-5217-4008-833f-87a1a278f2cb&flowId=DMC&initialQuery=31806253" target='_blank'><b>Try our Virtual Agent</b></a> - It can help you quickly identify and fix common connectivity issues for Remote Desktop Services.
Summary
This article helps you troubleshoot Remote Desktop Services (RDS) issues that prevent users from connecting to remote desktop sessions on Windows Server hosts.
Start by following the checklist to verify that the underlying components are working correctly. Then review the list of common issues and solutions. If you need further assistance, follow the instructions in the Data collection section to gather the diagnostic data that Microsoft support will need to help you fix your issue.
Troubleshooting checklist
Check the status of the Remote Desktop protocol (RDP)
- Check the status of the RDP protocol on a remote computer
- Check whether a Group Policy Object (GPO) is blocking RDP on a local computer
- Check whether a GPO is blocking RDP on a remote computer
- Modifying a blocking GPO
- Check the status of the RDP services
Check whether the RDP listener is working
- Check the status of the RDP listener
- Check the status of the RDP self-signed certificate
- Check the permissions of the MachineKeys folder
- Check the RDP listener port
- Check that another application isn't trying to use the same port
- Check whether a firewall is blocking the RDP port
Common issues and solutions
Credential limit per app
Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.
Windows allows only up to 20 credentials per app. If you have to have more than 20 credentials per app, follow these steps to bypass the 20-credential limit:
- Run regedit.
- Create or set the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Vault\MaxPerAppCredentialNumberDWORD-type registry value to a number that's greater than 20. - Restart the computer.
- Test the settings by creating a new set of credentials in the Remote Desktop client.
Potential risks: When you change this registry setting, it's important to keep the following things in mind:
- This is an admin operation. Any errors that are introduced into the registry could cause your computer to become unstable. Non-admin users change the registry entries at their own risk.
- This registry change will affect all apps that are installed on the computer.
Clients can't connect, and "Class not registered" error returned
When you try to connect to a remote computer by using a client that's running Windows 10, version 1709 or a later version, the client might not connect if the Remote Desktop Session Host server displays the "Class not registered (0x80040154)" error code.
This issue occurs if the user who's trying to connect has a mandatory user profile. To resolve this issue, install the July 24, 2018—KB4338817 (OS Build 16299.579) Windows update.
Remote laptop disconnects from wireless network
This issue might occur when a Remote Desktop client connects to a laptop computer by using an 802.1x wireless network. The laptop intermittently disconnects from the wireless network and doesn't automatically reconnect.
This is a known issue that occurs if the network authentication setting for the wireless network connection is User authentication.
To work around this issue, set the network authentication setting to User or computer authentication or Computer authentication.
Note: To change the network authentication settings on a single computer, you might have to use the Network and Sharing Center control panel to create a new wireless connection that uses the new settings.
For a full description of how to configure wireless network settings by using GPOs, see Configure Wireless Network (IEEE 802.11) Policies.
Data collection
If you need assistance from Microsoft support, we recommend you collect the information by following the steps mentioned in Gather information by using TSS for User Experience issues.
Prerequisites
- TSS must be run by accounts with administrator privileges on the local system, and EULA must be accepted (once EULA is accepted, TSS won't prompt again).
- We recommend the local machine
RemoteSignedPowerShell execution policy.
Note: If the current PowerShell execution policy doesn't allow running TSS, take the following actions:
- Set the
RemoteSignedexecution policy for the process level by running the cmdletPS C:\> Set-ExecutionPolicy -scope Process -ExecutionPolicy RemoteSigned.- To verify if the change takes effect, run the cmdlet
PS C:\> Get-ExecutionPolicy -List.- Because the process level permissions only apply to the current PowerShell session, once the given PowerShell window in which TSS runs is closed, the assigned permission for the process level will also go back to the previously configured state.
Gather key information before contacting Microsoft support
-
Download TSS on all nodes and unzip it in the C:\tss folder.
-
Open the C:\tss folder from an elevated PowerShell command prompt.
-
Start the traces on the client and the server by using the following cmdlets:
[!NOTE] Run these traces simultaneously on the client, Session Host server(s) and licensing server(s).
-
Client:
TSS.ps1 -scenario Net_RDScli -
Server(s):
TSS.ps1 -scenario Net_RDSsrv
If you get many security warnings related to the execution policy while running the script, run the
Set-ExecutionPolicy -ExecutionPolicy Bypass -force -Scope Processcmdlet to bypass those warnings. -
-
Respond to the EULA prompt.
-
Allow recording (Video), and enter Y.
-
When the script displays
Reproduce the issue and enter 'Y' key AFTER finishing the reproon both the client and the server(s), start reproducing the issue. -
Enter Y to finish the log collection after the issue is reproduced.
The traces will be stored in a zip file in the C:\MS_DATA folder, which can be uploaded to the Microsoft workspace for analysis.
Reference
- Clients can't connect and see "No licenses available" error
- "Remote Desktop Service is currently busy" error when connecting
- Remote Desktop client disconnects and can't reconnect to the same session
- Poor performance or application problems during remote desktop connection
- User can't authenticate or must authenticate twice
Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
