The trust relationship between this workstation and the primary domain failed
Symptom:
This happens often, usually laptops but sometimes desktop and even servers fall victim to this issue. There are apparently a number of reasons why this happens, but the main reason seems to be lost connection between the ‘client/server’ and the Domain controllers. If the scheduled password change occurs while the server or client is unavailable or has been shut down, then the passwords stored in the server/client and the domain controllers for the computer account mismatch, and you will end up getting this error when trying to logon to the server. It can also appear differently, like if all service accounts stop functioning with events logged as a result, or similar that happens when the server is still running and you have been able to logon or simply never logged off. Here is how to fix it without leaving and rejoining the domain.
Step 1: Getting into the machine
If you know the local admin password - great! just click Switch User and log in as .\administrator and your password "." replaces the computer name in case you dont know it.
If you do not know local admin password but previously logged in with your domain credentials, you are still good. Unplug the network cable, disable wireless, then reboot the system. After reboot log in with you domain credentials and you should be able to get back in.
Step 2: Reestablishing Trust
Open PowerShell as administrator. Run this command sequence:
$credential = Get-Credential – (enter domain admin account when prompted) (e.g. Enter your SA account here)
Reset-ComputerMachinePassword -Server ClosestDomainControllerNameHere -Credential $credential (e.g. ATSNA.atsauto.net)
Step 3: Sync with Group policy
Go to CMD > run as admin
Run the command gpupdate /sync
Restart the system