If you are facing this issue on Windows 10, Windows 11, or Windows Server, follow these proven solutions to restore your connection. 1. Fix Expired or Corrupt RDP Certificates
Even if RDP is technically enabled, specific firewall rules or third-party security software (like Bitdefender) might block the mstsc.exe process. i remote desktop connection error code 0x904 better
For those using Azure, error 0x904 often stems from a corrupt folder, which prevents the system from generating new certificates. The PowerShell Fix: If you are facing this issue on Windows
Try connecting using the remote machine's internal or external IP address (e.g., 192.168.1.50 ) instead of its computer name. or Windows Server
Explicitly add C:\Windows\System32\mstsc.exe to your firewall's allowed list.
Restart the Remote Desktop Services. Open PowerShell as Administrator and run: Restart-Service termserv -Force .