I Remote Desktop Connection Error Code 0x904 Install Jun 2026

Click and ensure Remote Desktop and Remote Desktop (WebSocket) are checked for both Private and Public networks.

On the host computer, press Win + R , type certlm.msc , and navigate to Remote Desktop > Certificates .

If the error occurs specifically during an installation or update of the Remote Desktop client, corrupted system binaries might be the cause.

Windows will automatically generate a fresh, valid self-signed certificate into the store, allowing the TLS handshake to complete successfully. 2. Fix the "MachineKeys" Folder Corruption (Azure VMs) i remote desktop connection error code 0x904 install

Inside certlm.msc , navigate to (or Remote Desktop > Certificates ).

Open your Azure VM via the portal and choose Run command . Run PowerShell: Select RunPowerShellScript .

If you encounter this error while trying to connect to an Azure Virtual Machine, a locked or corrupt MachineKeys folder may prevent the Remote Desktop service from properly accessing or creating cryptographic keys. Click and ensure Remote Desktop and Remote Desktop

Expired self-signed certificates are the most common cause of error 0x904 on standalone Windows Servers and local desktops.

On Windows Servers or Azure VMs, the cryptographic keys used for RDP might become corrupted.

Experts and system administrators have identified that this specific error rarely stems from a single setting but is usually triggered by one of the following "invisible" issues: Expired RDP Certificates Open your Azure VM via the portal and choose Run command

Rename-Item -Path "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys" -NewName "MachineKeys_old" Use code with caution. Click to execute the script across the hypervisor.

:: Check registry writeability reg query HKLM\SOFTWARE\Microsoft\Terminal Server Client /ve