Troubleshoot Remote Desktop Connection Failures
Before you begin
- Applies to:Direct Remote Desktop to Windows 11 Pro or Enterprise, or Windows Server 2022 or 2025. For RD Gateway or Connection Broker, check each hop separately.
- Where to start:Start on the client in PowerShell 7 or later. For target-side checks, use the target console or an alternate approved management connection.
- What you need:Have the actual target name, port, and account. Target-side checks require administrator access. Keep the same shell for commands that share variables.
Guide tools
Use this guide for RDP timeouts, connection refusals, or failures after the credential prompt. Test from the same network as the affected client. Keep the original hostname, time, and error text.
Troubleshooting Steps
Check name resolution and the TCP path
ClientSet the hostname to the computer name entered in Remote Desktop. Use the port from that connection if one was specified, or leave the default TCP port 3389. TcpTestSucceeded confirms that something accepts TCP at that address. It does not confirm that RDP authentication works.
$Target = 'server01.corp.example.com'$Port = 3389Resolve-DnsName -Name $TargetTest-NetConnection -ComputerName $Target -Port $PortCheck the service and listener on the target
HostRun on the target from the console. Expect TermService to be running and an rdp-tcp listener in Listen state for a standard host. If policy specifies a custom port, compare it with the binding and the client destination.
Get-Service -Name TermServiceqwinsta.exe$RdpKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp'$Port = (Get-ItemProperty -LiteralPath $RdpKey -Name PortNumber).PortNumberGet-NetTCPConnection -LocalPort $Port -State ListenReview effective firewall and sign-in policy
PolicyCheck the active firewall profile and the rules attached to the RDP service. Compare source scope and profile with the affected client path. If TCP works but sign-in fails, use resultant policy to check Allow and Deny log on through Remote Desktop Services. Deny takes precedence. A certificate warning needs a separate check of hostname, trust, certificate expiry, and time.
Get-NetConnectionProfileGet-NetFirewallServiceFilter -Service TermService -PolicyStore ActiveStore | Get-NetFirewallRule | Select-Object DisplayName, Enabled, Profile, Direction, Actiongpresult.exe /scope computer /rCorrelate the failed attempt and verify
LogsMatch the event timestamp with the affected session and use Security event 4625 when failure auditing is enabled. Correct the confirmed rule, rights assignment, certificate binding, or dependency through its owning policy. Record the old value for rollback. Then test a fresh session from the original client, checking both the expected certificate and successful desktop sign-in.
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational' StartTime = (Get-Date).AddMinutes(-30)} -MaxEvents 30 | Select-Object TimeCreated, Id, MessageReferences
Your feedback keeps these production procedures accurate and battle-tested.