Once you resolve error code 0x904 extended 0x7, prevent recurrence with these policies:
Open Command Prompt as Administrator and run: restart-service termserv -force (or restart the "Remote Desktop Services" in services.msc ).
on the server side or forcing the RDP security layer via Group Policy ( gpedit.msc ) can resolve encryption mismatches. Fix MachineKeys Corruption (Azure/Cloud VMs) : If the host is an Azure VM, the MachineKeys