The trust relationship between this workstation and the primary domain failed
When playing around with some Hyper-V servers that have been inactive for some time, we received an error:
The cause of this is due to the fact that Active Directory is doing a lot more than simple user name and password storage. We found that a Hyper-V system that remains off for some time, then is turned on again can suffer this. The reason for this has to do with the way that some applications use the Active Directory. Take Exchange Server, for example. Exchange Server stores messages in a mailbox database residing on a mailbox server. However, this is the only significant data that is stored locally on Exchange Server. All of the Exchange Server configuration data is stored within the Active Directory. In fact, it is possible to completely rebuild a failed Exchange Server from scratch (aside from the mailbox database) simply by making use of the configuration data that is stored in the Active Directory.
The suggestion by some other blogs is to: simply reset the computer account. To do so, open the Active Directory Users and Computers console and select the Computers container. Right click on the computer that you are having trouble with. Select the Reset Account command from the shortcut menu, as shown in Figure 2. When you do, you will see a prompt asking you if you are sure that you want to reset the computer account. Click Yes and the computer account will be reset.
This is perfectly safe to do, but is not likely to resolve the issue.
The Fix
1. Log into the server in question using the non domain admin account.
2. Open the Power Shell and run the command:
$credential = Get-Credential
(When prompted, you need to enter the domain administrator account and name.)
3. Then run the command:
Reset-ComputerMachinePassword -Server ClosestDomainControllerNameHere
(Replacing the “ClosestDomainControllerNameHere” with your domain AD domain. domain.com for example.)
After running this you should be good to login.