Windows: Re(eeee)-Authenticate Domain Machine

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.

About: Ryan Parker

I'm a former captain of the Cyber Defense team, Current Infrastructure Security Specialist. I also have a side job helping small to medium business with anything technology doing everything imaginable. One of my hobbies is building out infrastructures for myself, friends, and clients. I current maintain a homelab with about 400GB of RAM, 100+ TB of storage, and tons of CPU cores.

Leave a Reply

Your email address will not be published. Required fields are marked *