There's a Windows issue made me performing a System Restore to a 1.5 month old restoration point. But that leads to the below issue when I attempted to log in with my latest domain credential:

the trust relationship between this workstation and the primary domain failed

To fix this issue, you must first be able to log in:

  • If you have a local administrator account you type in .\administrator and the password.

  • If you don't have local admin account enabled or don't remember the password. You can still log on by using the old domain credential when the restoration point was created. To use this credential, first unplug any network connection (Ethernet & Wifi) and restart.

Once you're in, open a elevated PowerShell session and do the following:

Reset-ComputerMachinePassword -Server <domain server> -Credential (get-credential)

get-credential prompt for a credential, use your latest domain credential. You should be good now.

Lastly, always activate your local admin account and remember the password!!!

References