Has your machine gone “out of sync” with the domain? Mine did at work, and it was very annoying. I got the following error when I tried to login today:
The trust relationship between this workstation and the domain failed
Luckily, the fix is pretty easy, it just requires little bit of Powershell magic to get it working again.
Open up a local admin Powershell. If you are unable to login to the machine, use the .\ prefix to specify a local account.
$credential = Get-Credential;
In the box, enter valid credentials for a domain admin account (or an account with AD edit/add permissions), then run the following commands in the same Powershell window but replace YourDomainController.TLD with your domain controller’s FQDN.
Reset-ComputerMachinePassword -Server YourDomainController.TLD -Credential $credential
That should fix it. Reboot and you should be able to log in again. If it did not work, the next thing to try is double checking that your DNS is set correctly. It should be set the same as your Domain Controller.
If you appreciate our content and would like to be notified when we post a new article, you can subscribe for notifications using this form: