The trust relationship between this workstation and the primary domain failed

This is the error message I received today while working on one of my VMs. This machine is part of a domain whose domain controller was recently moved to a different subnet. I then moved the other machines that are members of this domain to the same new subnet, and that’s where the error message appeared, right after entering the username and password for the machine.

One interesting detail is that this message would only appear when using RDP, using the Console in vSphere worked without issues. The fix was quick and easy though:

  1. Leave the domain and join a workgroup (WORKGROUP will do)
  2. When you are prompted to reboot, do not do it (for this fix, it’s not necessary to do it at this point)
  3. Rejoin the domain
  4. When prompted, reboot

Now you can RDP again into the machine.