Fix Trust relationship failed issue without domain rejoining – TheITBros
Causes of Trust relationship failed or "The trust relationship between this workstation and the primary domain failed" error and solutions on how. If you Google “the trust relationship between this workstation and the primary domain failed”, you get plenty of information from support blogs. There are two ways how can you manage your client and server machines in home or business environment, including Workgroup and Domain.
For a single machine, you can configure the machine account password policy through the registry. To do this, run regedit.
Edit the value of the MaximumPasswordAge parameter, in which you can specify the maximum period of validity of the computer password in the domain in days. Other option is to completely disable sending a request for computer password updates, by changing the value of the DisablePasswordChange parameter to 1. The Active Directory domain stores the current computer password, as well as the previous one just in case. If the password was changed twice, the computer that is using old password will not be able to authenticate in the domain and establish a secure connection.
If the password has expired, computer changes it automatically when login on the domain.
The trust relationship between this workstation and domain failed, a Windows fix in two lines
Therefore, even if you did not Power on your computer for a few months, trust relationship between computer and domain still be remaining and the password will be changed at first registration in the domain. Trust relationship failed if computer tries to authenticate on domain with an invalid password.
Typically, this occurs after reinstalling the OS, then the system state was restore from an image backup or snapshot of the Virtual machine, or it was just turned off for a long time. In this case, the current value of the password on the local computer and the password in the domain will be different. The most obvious classic way to restore trust relationship is: Reset local Admin password Move computer from Domain to workgroup Reboot Reset Computer account in the domain using ADUC console Rejoin computer to the domain Reboot again This method is the easiest, but not the fastest and most convenient way and requires multiple reboots.
Also, we know cases when user profile is not reconnecting correctly after rejoining.
- Reset-ComputerMachinePassword using PowerShell
- Applicable Products
We will show how to restore a trust relationship and restore secure channel without domain rejoin and reboot! The method is fast and efficient.
To use it, login to the target system with Local administrator!!! You can check for a secure connection to the domain using Netdom by using the following command: This is the fastest and most convenient way to reset the password of a computer that does not require a reboot.
Unlike the Netdom utility, PowerShell 3. You can install it manually see here on this platforms: If you want to restore a trust relationship as a local Administrator, run PowerShell console and execute this command: Cmdlet does not display any messages on success, so just change the account, no reboot required.
Accordingly, if you log on to the computer under the local account and attempting to execute the command, you will receive an access denied error. Run this command from PowerShell: The underlying problem when you see this error is that the machine you are trying to access can no longer communicate securely with the Active Directory domain to which it is joined.
DON’T REJOIN TO FIX: The trust relationship between this workstation and the primary domain failed
When you try to access this machine using a domain account, it fails to verify the Kerberos ticket you receive from Active Directory against the private secret that it stores locally. I think you can also come across this error if for some reason the system time on the machine is out of sync with the system time on the domain controller. This solution also fixes that problem. The standard fix This problem can be caused by various circumstances, but I most commonly run into it when I reset a virtual machine to a system snapshot that I made months or even years before.
When the machine is reset, it is missing all of the automatic password changes that it executed against the domain controller during the intervening months.
The password changes are required to maintain the security integrity of the domain. Support blogs and Microsoft will generally tell you to rejoin the domain to restore the trust relationship.
Another option they will give is to delete the computer object and recreate it without a password and rejoin. Microsoft support article on the topic: Recently, when I ran into this problem, the virtual machine that reset was an enterprise certificate authority joined to my test domain.
Error: The trust relationship between this workstation and the primary domain failed
Well, guess what, Microsoft will not allow you to rename or unjoin a computer that is a certificate authority—the button in the computer property page is greyed out. Powershell v3 shipped with a cmdlet for resetting computer passwords.
For those with Powershell skills, this is a much better option.
Powershell v3 ships with the latest version of Windows and can be downloaded from Microsoft: You can fix this by opening Powershell with administrative rights and running Update-Help. You can use the Get-Credential cmdlet for a secure way to generate a PSCredential, which can be stored in a variable and used in a script. The Server parameter is the domain controller to use when setting the machine account password. A better fix Just change your computer password using netdom.
You need to be able to get onto the machine.