The trust relationship between this workstation and the primary domain failed

AD trust failed

it’s not common, but once in a while you will come across an error like this “The trust relationship between this workstation and the primary domain failed“, causes of this are very, it’s a very easy to fix it too, here are some list of reasons:

  • Admin deleted Computer object in AD
  • System restored, which is a different machine account password than AD
  • Machine imaged and restored
  • object corruption in AD
  • AD policy disables a computer after x number of days

You will get a message like this:

If you are logged into the computer local user, you can test by running the PowerShell command

command: Test-ComputerSecureChannel -Server NameOfDomainController

In this example, it’s showing true, but if you are having an issue you would get false

To fix it:

You can reset it by running a PowerShell command:

Command: Reset-ComputerMachinePassword -Credential YourDomainName\YourDomainAdmin

or you can rest from Domain Controller

Another way is to disjoin from the domain and re-join it

If you get this on your network status: Unauthenticated

That means your PC to domain controller lost trust

You can try running the repair command to fix it

When you run Test-ComputerSecureChannel and get the result False, which means your computer lost trust in your domain controller

The repair command will fix, without restarting your computer:

Test-ComputerSecureChannel -Repair

You may need to restart the network adaptor to take effect

command: Restart-NetAdapter *

note: * means all networks will restart, if you have more than one you can use -Name and Name of your adaptor

Hope that helped you out with your issue