FIX: Trust relationship between this workstation and the primary domain failed

My trust relationship between my workstation and the primary domain failed.”

You will only see the error message “The trust relationship between this workstation and the primary domain failed”. In a work environment because the error message pops-up when the workstation and the Domain Controller is out of ‘sync’.

The reason this is happening is because there is a password mismatch between the Domain Controller and is workstation. Each computer in Active Directory stores the password. If there is for example a database restore, or a configuration is incorrect the password will be mismatched.


Let’s fix “The trust relationship between this workstation and the primary domain failed”.

The tutorial is separated in two tutorials.

  • The fix for the techies among us, including PowerShell.
  • The fix for the dummies among us, including screenshots.

The fix for the techies among us, including PowerShell.

We will use PowerShell as an easy fix. Make sure you’re a local administrator though.

  • Go to Start,
  • Search for PowerShell,
  • Open PowerShell as Administrator,
  • Copy and paste the following cmdlet in PowerShell.
    • Change the DOMAIN to your Domain.
    • Change Admin to an administrator in your DOMAIN.
Test-ComputerSecureChannel -Credential DOMAIN\admin -Repair

The Test-ComputerSecureChannel cmdlet verifies that the channel between the local computer and its domain is working correctly by checking the status of its trust relationships. If a connection fails, you can use the Repair parameter to try to restore it.

For more about Test-ComputerSecureChannel please go to this link: Test-ComputerSecureChannel.


The fix for the dummies among us, including screenshots.

Fix it locally on the device.

If you have local administrator rights on the workstation then you can also resolve it on the device itself. All you have to do is remove the workstation from the domain and add it again.

  • Go to File Explorer,
  • Right click on This PC,
  • Choose Properties,
  • Choose Change Settings,
  • Change again,
  • Change to the WORKGROUP.

Restart the device and then add the workstation to the domain again.

FIX: The trust relationship between this workstation and the primary domain failed.
FIX: The trust relationship between this workstation and the primary domain failed.

Fix it in Active Directory.

If you have access to Active Directory you can also search for the computer in AD and delete the workstation here.

After the computer is restarted, a new trust relationship is established with Active Directory and you will see the device in AD again.

FIX: The trust relationship between this workstation and the primary domain failed.
FIX: The trust relationship between this workstation and the primary domain failed.

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work as a PowerShell Automation Engineer @ Wortell.

Leave a Reply

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