Trust relationship between this workstation and the primary domain failed.

Problem

You see the error message "Trust relationship between this workstation and the primary domain failed" on the screen when:

  • Installing image creator component
  • Accessing a remote machine's share

Cause

  1. Invalid domain user credentials
  2. When multiple computers exist with the same name inside a domain

Resolution

To resolve this problem, follow any of the solutions given below:

Rejoin the computer to the domain (Manual Method)

Follow the steps given below to remove the computer from the domain, and then reconnect it:

  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 prompted, restart the computer.
  7. After restart, again go to Computer Name tab and select Change.
  8. Under the Member of heading, select Domain, and type the domain name.
  9. Enter domain credentials when prompted and click OK.
  10. Restart the computer after joining the domain.

Rejoin the computer to the domain (Script Method)

You can run a script to rejoin the computer to the domain:

    1. Copy and paste the below script into a text file and save it with a .ps1 extension:
$credential = Get-Credential
$serverstr = Read-Host -Prompt 'Enter domain name'
Reset-ComputerMachinePassword -Credential $credential -Server $serverstr
    
  1. Run the script using PowerShell with local admin privileges (PowerShell 3.0 or higher).
  2. When prompted, enter domain admin credentials.
  3. Input your domain name in the PowerShell window and press Enter.

Access the workstation using its local account

If you do not want to rejoin the machine to the domain or if rejoining fails, you can access the workstation using its local account instead.

Keywords: Trust relationship failed, rejoin computer to domain.