The error code 0x904 and extended error code 0x7 when trying to establish a Remote Desktop Connection (RDC) can be quite specific and may not have a widely documented solution. However, I'll guide you through some general troubleshooting steps and potential solutions that might help resolve the issue.

  1. Open Server Manager > Remote Desktop Services > RD Gateway.
  2. Under SSL Certificate, click View or Replace.
  3. Ensure the certificate is issued by a trusted CA (not self-signed for external clients).
  4. Confirm the certificate name matches the external DNS name clients use (e.g., rdg.yourcompany.com).
  5. If self-signed is necessary, export the .cer file and install it on the client under Trusted Root Certification Authorities.

Step 5: Restart Remote Desktop Services on the Host (If accessible)

On the remote machine (via out-of-band management or console):