Trust Relationship Failed

“The trust relationship between this workstation and the primary domain failed.”

Cause:
For this there can be several causes. Sometimes it’s unknown.
– Removed a Computer from the Active Directory before manually changing it’s domain locally.

Solution:

The Reset-ComputerMachinePassword cmdlet changes the computer account password that the computers use to authenticate to the domain controllers in the domain. You can use it to reset the password of the local computer.

Example 1: Reset the password for the local computer

PowerShell

Reset-ComputerMachinePassword

This command resets the computer password for the local computer. The command runs with the credentials of the current user.

Example 2: Reset the password for the local computer by using a specified domain controller

PowerShell

Reset-ComputerMachinePassword -Server “DC01” -Credential Domain01\Admin01

This command resets the computer password of the local computer by using the DC01 domain controller. It uses the Credentialparameter to specify a user account that has permission to reset a computer password in the domain.

Example 3: Reset the password on a remote computer

PowerShell

Invoke-Command -ComputerName “Server01” -ScriptBlock {Reset-ComputerMachinePassword}

This command uses the Invoke-Command cmdlet to run a Reset-ComputerMachinePassword command on the Server01 remote computer.

Error(s): “A parameter cannot be found that matches parameter name ‘Credential’.”
Reason: PowerShell is less than version 3. Which does not support certain parameters.
Fix:
Install KB2819745 update, Windows Module Framework 4.0.

Leave a Reply

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

19 + eleven =