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
- Invalid domain user credentials
- 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
Follow the steps given below to remove the computer from the domain, and then connect the computer to the domain.
- Use a local administrator account to log on to the computer.
- Select Start, press and hold (or right-click) Computer > Properties.
- Select Change settings next to the computer name.
- On the Computer Name tab, select Change.
- Under the Member of heading, select Workgroup, type a workgroup name, and then select OK.
- When you are prompted to restart the computer, select OK.
- On the Computer Name tab, select Change again.
- Under the Member of heading, select Domain, and then type the domain name.
- Select OK, and then type the credentials of the user who has permission in the domain.
- When you are prompted to restart the computer, select OK.
- Restart the computer.
Rejoin the computer to the domain by running a script
You can run a script to rejoin the computer to the domain. Run the following script on the machine where the issue has occurred using local admin privileges,
- Copy and paste the below script to a text file and name it with .ps1 extension.
$credential = Get-Credential
$serverstr = Read-Host - Prompt 'Enter domain name'
Reset-ComputerMachinePassword -Credential $credential -Server $serverstr
- Run the script with local admin privileges using powershell 3.0 or above.
- After you run the script, enter the domain admin credentials with privileges to change the user password.
- In the PowerShell command prompt, specify your domain name and press enter.
Access the workstation using its local account
If you do not want to rejoin the machine to the domain or if the rejoining fails, you can try accessing the workstation machine using its local account.
Keywords: Trust relationship failed, rejoin computer to domain.