I Remote Desktop Connection Error Code 0x904 Install ^new^ Jun 2026

Log into the host machine locally or via an out-of-band management console (like Azure Serial Console or Hyper-V manager).

Grant permissions to both the Everyone group and the local system accounts.

Run the following command to rename the corrupted MachineKeys folder. This forces Windows to create a new one: powershell

Click "Allow another app," browse to C:\Windows\System32\mstsc.exe , and add it to the list. 3. Resolve Network or VPN Instability i remote desktop connection error code 0x904 install

Unlike many RDP errors that relate to network connectivity or firewalls, error 0x904 is specifically a . It commonly occurs in the following scenarios:

Look for the certificate issued to the host's name and check the Expiration Date .

Open as an Administrator and execute the following command to restart the Remote Desktop service and force Windows to instantly generate a fresh certificate: powershell Restart-Service termserv -Force Use code with caution. 2. Clear Certificate Store Corruption (Fix for Azure VMs) Log into the host machine locally or via

Add C:\Windows\System32\mstsc.exe to the allowed list on both the client and host.

1. Fix Certificate Corruption on Remote Server (Most Common)

A known performance quirk in modern Windows environments introduces communication blocks when parsing Fully Qualified Domain Names (FQDNs) over certain Virtual Private Networks (VPNs) or custom DNS topologies. If the local network cannot resolve the hostname efficiently, the RDP protocol terminates the connection handshake prematurely, throwing error 0x904. Unable to RDP into some Windows Servers - Error code: 0x904 This forces Windows to create a new one:

The MachineKeys directory lacks permissions or contains corrupted files. Host cannot generate or read the certificate's private key.

Error 0x904 often appears when the client is strict about SSL certificates, but the server is using a self-signed or expired certificate (common in dev/test environments).

The Microsoft Remote Desktop 0x904 error very commonly occurs when connecting via an unstable network connection or a slow VPN.

You check the server—it’s online. You check other servers on the same subnet, and they work perfectly. This "random" behavior is the first clue. As documented by experts at TheITBros.com , this error often stems from unstable network paths or VPN bottlenecks, but when it's specific to just one machine, the culprit is usually deeper. The Investigation

Error code 0x904 in Remote Desktop Connection (RDP) typically signals that a connection could not be established due to expired or corrupt security certificates network instability firewall blocks