Remote Desktop error 0x204: "We couldn't connect to the remote PC"
Error 0x204 is not a documented Microsoft code. The Remote Desktop and Windows App clients show it when a connection fails at "Initiating Remote Connection". Treat it as a general "can't reach the remote PC" problem and check the host, the name or IP, port 3389 and the Remote Desktop settings, in that order.
On this page
What it means
The dialog usually reads: "We couldn't connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled." The code 0x204 appears while the client is on the "Initiating Remote Connection" step. A companion code, 0x4, appears during "Configuring the Remote PC".
Microsoft does not publish a meaning for 0x204, so there is no single official fix. Some third-party sites call it a "handshake timeout", but that label does not come from Microsoft. In practice it behaves like any other failure to reach a Remote Desktop host, so the sensible approach is to check the path one link at a time: host, name, network, port, settings, then the client.
The causes below come from a vendor guide and community threads, not from Microsoft documentation. Where a menu path differs between Windows versions, both are given. Windows Server 2012 R2, the only server version named in the reports, is out of support and no longer receives security updates.
Symptoms and causes
You are likely dealing with this problem if:
- The connection stops at "Initiating Remote Connection" with code 0x204.
- The dialog says the remote PC could not be reached.
- It can be intermittent: one Windows App user on macOS reported connecting only about 1% of the time after moving from the old client.
- One thread reports it starting after the November 2020 Windows updates on Windows Server 2012 R2, from both Mac and Windows clients.
The usual causes, most common first:
- Host is off, asleep or unreachable
- The most common reason. If the target PC is not running or not on the network, the client has nothing to talk to.
- Wrong name or IP, or a DNS failure
- A mistyped hostname, a DNS problem, or a DHCP lease that gave the target a new IP address.
- Port 3389 blocked or nothing listening
- Windows Firewall, third-party security software, NAT, a VPN or a cloud security group may block TCP 3389 (or your custom port), or the Remote Desktop listener may not be running on that port.
- Remote Desktop disabled or unavailable on the host
- The setting is off, the PC runs Windows Home (which has no RDP server), or Group Policy overrides the local setting.
- User not allowed to connect
- The account is not in the Remote Desktop Users group, or a policy or credential mismatch blocks it.
- Client-side problem
- A stale saved connection, stale saved credentials, or a fault in the Windows App on Mac.
- Server change after Windows updates
- One unresolved thread links it to updates on a server. This is not confirmed by Microsoft.
How to fix it
Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.
1.Confirm the host is on and reachable
A sleeping or offline PC produces exactly this failure.
- Check that the remote PC is powered on, awake and connected to the network.
- Try connecting by IP address instead of the computer name. If the IP works, the problem is name resolution.
- To compare name and IP, run one of these on a Windows client (
nslookupalso works in Terminal on a Mac).nslookup <host> Resolve-DnsName <host>
2.Test port 3389 from the client
Shows whether the network path to the Remote Desktop port is open.
- On a Windows client, run this in PowerShell, using your host name or IP.
Test-NetConnectionis a Windows PowerShell cmdlet and is not available on a Mac. If you use a custom port, replace 3389.Test-NetConnection -ComputerName <host> -Port 3389 - On a Mac, open Terminal and use
ncinstead. A "succeeded" message means the port is reachable.nc -vz <host> 3389 - If the test fails, the cause is routing, a firewall, NAT, a VPN or no listener on the host. Continue with the next fixes on the host.
3.Make sure Remote Desktop is enabled on the host
The host refuses connections if the feature is off or overridden.
- On Windows 10, Windows 11 or Windows Server 2016 and later, open Settings > System > Remote Desktop and turn the option on.
- On Windows Server 2012 R2, open System Properties (right-click This PC, choose Properties, then Remote settings), go to the Remote tab and select Allow remote connections to this computer.
- Confirm the PC is not running Windows Home, which has no RDP server.
- On a managed machine, check the effective Group Policy, since it can override the local setting.
- Confirm the Remote Desktop Services service is running and that your account is a member of Remote Desktop Users.
4.Check the firewall rules
A disabled Remote Desktop rule, or one enabled only for the wrong network profile, blocks the connection.
- On the host, list the Remote Desktop firewall rules and check they are enabled for the right profile (Domain, Private or Public).
Get-NetFirewallRule -DisplayGroup "Remote Desktop" - Check any third-party security software, router NAT or port forward, VPN and cloud security group for the same port.
- If you must rule the Windows firewall in or out, switch it off only briefly for the test and turn it back on straight away.
5.Confirm the host is listening on the port
If nothing listens on the port, no firewall change will help.
- On the host, check for a listener on 3389.
Get-NetTCPConnection -LocalPort 3389 -State Listen - Alternatively use netstat.
netstat -ano | findstr :3389 - If you think a custom port is in use, read the configured port (read-only, nothing is changed). The value is the port the listener should use. Then make sure the firewall and any port forward use that same port, and repeat the listener check with it.
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name PortNumber
6.Reset the client side
A stale saved connection or credential can fail even when the host is fine.
Before you start: Resetting app data on a Mac removes saved connections in that app, so note down host names first.
- Delete the saved connection and create it again.
- Clear the saved credentials for that host.
- Update the Remote Desktop client or Windows App to the latest version.
- Test from another device. If that works, the fault is on the first client. On a Mac, reset the app data or reinstall the app.
7.Read the Event Viewer logs on both ends
The logs can show why the session was refused when the dialog does not.
- Open Event Viewer and go to Applications and Services Logs > Microsoft > Windows > TerminalServices-RemoteConnectionManager, and read recent errors.
- Check TerminalServices-LocalSessionManager in the same place.
8.Test removing a recent update on a server
One thread tied the error to Windows updates on Server 2012 R2. Microsoft has not confirmed this as a fix, so treat it only as a test, and only if the error began right after an update.
Before you start: Create a restore point or backup first, and note which update you remove so you can reinstall it. Server 2012 R2 is out of support, so plan to move to a supported version rather than rely on this.
- On Windows Server 2012 R2, open Control Panel > Programs and Features > View installed updates, and remove the update installed just before the failures began.
- On Windows 10, Windows 11 or Windows Server 2016 and later, the equivalent is Settings > Windows Update > Update history > Uninstall updates.
- Restart the server and try the connection again.
Check that it worked
- The client gets past "Initiating Remote Connection" and shows the remote sign-in or desktop.
- Test-NetConnection (Windows) or nc -vz (Mac) to the host on the Remote Desktop port reports success.
- Connecting several times in a row works each time, not just once.
If it still fails
- Try a different client device and a different network to see whether the fault follows the client, the network or the host.
- Note the exact steps where it fails, the host Windows version and any recent updates, then ask on Microsoft Q&A with the Event Viewer entries.
- On a work or school machine, contact your IT administrator: Group Policy or a network firewall may be blocking Remote Desktop.
Questions
Is 0x204 an official Windows error code?
No Microsoft page defines it. It is a generic connection-failure code shown by the Remote Desktop and Windows App clients.
Can I connect to a PC that runs Windows Home?
No. Windows Home has no RDP server, so it cannot be the target of a Remote Desktop connection.
Sources
- Microsoft Remote Desktop Getting 0x204 and 0x4 Error After Last Windows UpdateOfficial · Microsoft Q&A
- Windows APP for Remote Desktop only able to connect 1% of timeOfficial · Microsoft Q&A
- Connect to Remote Desktop Services and remote PCs on macOS (archived)Official · Microsoft Learn
- Understanding Remote Desktop Protocol (RDP)Official · Microsoft Learn
- RDP error code 0x204 troubleshooting guide · TSplus