Windows Domain Trust Relationship Failed Error

Issue or Error Symptoms

When logging into a domain-joined Windows computer, you get the following error message:

The trust relationship between this workstation and the primary domain failed.
Code language: plaintext (plaintext)


There are many ways to resolve this issue, but here are two ways that have always worked for me.

Using PowerShell

The Test-ComputerSecureChannel cmdlet is available in PowerShell 5.1 or later. To fix the trust relationship with the domain, use the -Repair switch which will disjoin and rejoin the domain. You will also need to specify a domain administrator credential that can remove and join the domain (the -Credential switch takes care of that).

This will repair the trust relationship without requiring multiple reboots. All you have to do is login using a local administrator account and execute the following cmdlet from an elevated PowerShell window.

Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
Code language: PowerShell (powershell)

Manual Method

If you prefer to do this manually, you will have to remove the computer from the domain, reboot, then rejoin it to the domain and reboot one more time.

  1. Use a local administrator account to log on to the computer. 
  2. Select Start, press and hold (or right-click) Computer > Properties.
  3. Select Change settings next to the computer name.
  4. On the Computer Name tab, select Change.
  5. Under the Member of heading, select Workgroup, type a workgroup name and then select OK.
  6. When you are prompted to restart the computer, select OK.
  7. On the Computer Name tab, select Change again.
  8. Under the Member of heading, select Domain, and then type the domain name.  
  9. Select OK, and then type the credentials of the user who has permissions in the domain.
  10. When you are prompted to restart the computer, select OK.
  11. Restart the computer.

I would recommend the PowerShell method because it is quick, easy, and does not require multiple reboots of the machine.