saasrankedSoftware, ranked on the facts

Fix the "trust relationship failed" domain sign-in error in Windows

Applies to Domain-joined Windows clients, Windows Server member servers, Windows PowerShell 5.1 · 15 min · Advanced · Needs an administrator account
Checked against Microsoft's documentation on 24 Sept 2026

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

In short

  • While domain sign-in fails, you can still sign in with a local user account or cached credentials1.
  • The System log shows Event 3210 from the NETLOGON source when the secure channel is broken1.
  • Test-ComputerSecureChannel returns True if the channel works and False if it doesn't; its Repair parameter needs a member of the local Administrators group3.
  • Microsoft's repair is nltest /sc_reset:domain_name or Test-ComputerSecureChannel -Repair -Credential *, run with domain admin credentials, then a restart2.
  • Test-ComputerSecureChannel works only on domain member computers; on domain controllers, use netdom.exe or nltest.exe3.

This error means the computer can't set up a secure channel with a domain controller, because its machine password doesn't match the copy in Active Directory1,5. Sign in with a local account or cached credentials. Then run Test-ComputerSecureChannel -Repair -Credential * with domain admin credentials and restart2. If that fails, reset the machine password with Reset-ComputerMachinePassword4,5.

What the error means

A computer that is joined to a domain talks to domain controllers over a secure channel. The channel depends on a machine password that must match the copy in Active Directory5. When the two values differ, the computer can't authenticate, and domain sign-in fails with this error1,5.

You can still sign in with a local user or cached credentials1. The System log in Event Viewer shows Event 3210 from NETLOGON. It says the computer "could not authenticate" with a domain controller1.

Before you start

  • Sign in with a local account or cached credentials. Domain credentials won't work until the channel is repaired1.
  • Open PowerShell with Run as administrator. Test-ComputerSecureChannel needs it, and its Repair parameter needs a member of the local Administrators group3.
  • Have domain admin credentials ready. Microsoft's repair commands run with them2.
  • Use these steps on a client or member server only. On a domain controller, Test-ComputerSecureChannel returns false positive errors3.
  • The repair ends with a restart, so save your work first2.

Fixes

  1. Check that the domain controller is reachable. In Command Prompt, find the domain controller the computer uses5:

    Command Prompt
    set | find /i "LOGONSERVER"

    Then test the network connection to that domain controller's fully qualified domain name, for example with the Test-Connection cmdlet5. If there is no connection, fix the network path first5.

  2. Test the secure channel. In PowerShell, run this command5:

    PowerShell
    Test-ComputerSecureChannel -Verbose

    It returns True if the channel works and False if it doesn't3. If it returns True, try signing in with your domain account again5.

  3. Repair the secure channel. Run this command and enter domain admin credentials when asked2:

    PowerShell
    Test-ComputerSecureChannel -Repair -Credential *

    The Repair parameter removes and rebuilds the channel set up by the NetLogon service3. From Command Prompt, you can run this command instead, with your domain name in place of domain_name2:

    Command Prompt
    nltest /sc_reset:domain_name

    Restart the computer afterwards2.

  4. Reset the machine password. If the repair fails, reset the password the computer uses to authenticate to domain controllers4,5. This example uses the DC01 domain controller and an account that may reset computer passwords4:

    PowerShell
    Reset-ComputerMachinePassword -Server "DC01" -Credential Domain01\Admin01

    Put your own domain controller and admin account in place of DC01 and Domain01\Admin014. Then run Test-ComputerSecureChannel again to check the result3.

  5. Remove the computer from the domain and join it again. Microsoft lists this as the last option when a password reset doesn't restore the channel5. Its examples pass a domain account to the Remove-Computer and Add-Computer cmdlets, and both restart the computer5. The Add-Computer example also uses a local administrator account5.

If nothing works

If the error comes back, find out why the passwords drift apart. Microsoft's articles compare the computer's password date with the pwdLastSet value in Active Directory1,2.

When Active Directory holds the newer password, look for a virtual machine reverted to an old snapshot, a restore from backup or an old restore point, or a power loss2. When the computer holds the newer password, check Active Directory replication and domain controller health. Microsoft says that case can't be fixed on the computer itself6.

Also check that two registry values hold the computer's real name, not its fully qualified domain name1:

Command Prompt
Reg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName /v ComputerName
Reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters /v hostname

Questions

Why does the trust relationship break?
Either the computer has an older machine password than Active Directory, or Active Directory has an older one than the computer1. Causes Microsoft lists include reverting a virtual machine to an old snapshot, restoring from a backup or an old restore point, and a sudden power loss2. Active Directory replication problems and a domain controller restored from backup are others6.
Can I just rejoin the computer to the domain?
Yes. Microsoft calls rejoining a valid solution1. If the error keeps coming back, Microsoft suggests finding the root cause instead1.
Can I run Test-ComputerSecureChannel on a domain controller?
No. On domain controllers it returns false positive errors3. Use netdom.exe or nltest.exe to check and reset their secure channels3.

24 Sept 2026: Published.

Sources

  1. Broken trust relationship between domain-joined device and its domain, Microsoft Learn. Accessed 24 Sept 2026.
  2. Active Directory has a newer password value than client device, Microsoft Learn. Accessed 24 Sept 2026.
  3. Test-ComputerSecureChannel, Microsoft Learn. Accessed 24 Sept 2026.
  4. Reset-ComputerMachinePassword, Microsoft Learn. Accessed 24 Sept 2026.
  5. Troubleshoot a failed trust relationship in an Azure Windows VM, Microsoft Learn. Accessed 24 Sept 2026.
  6. Client device has a newer password value than Active Directory, Microsoft Learn. Accessed 24 Sept 2026.