You are currently viewing Solved: The Trust Relationship Between This Workstation and the Primary Domain Failed

Solved: The Trust Relationship Between This Workstation and the Primary Domain Failed

Issue

When attempting to log into a domain-joined Windows machine, the following error is presented:

The Trust Relationship Between This Workstation and the Primary Domain Failed

The error can be caused by a number of reasons, some of which are (but not limited to):

  • The computer name has been removed from the domain controller
  • The computer name has been changed and it has not reflected on the domain controller

Solution

On the affected machine, remove the network connection and log in with the last known domain credentials.

Once logged in, reconnect the network cable and open Windows PowerShell as an administrator. (Press the Windows Button > type ‘PowerShell’ > right-click ‘Run as administrator’.

Enter the following commands:

$credential = Get-Credential

When the pop-up box appears, enter a domain-joined administrator username and password and Enter once done to proceed to the next command.

Reset-ComputerMachinePassword -Credential $credential

No error messages should be presented when entering the above commands.

Once complete, restart your machine and log into the machine with domain credentials.

iwiizkiid

Kelvin is a Cyber Security professional with years and experience working with organisations in different verticals, both large and small. He enjoys contributing to the Network Wizkid knowledge base and he also creates technical content. Kelvin enjoys learning new things and often does this by working on achieving new technical certifications. He holds many professional certifications and academically, he has achieved a Bachelors and Master's degree in both Computer Networks and Cyber Security.

Leave a Reply