Troubleshoot a Failed Windows Domain Trust Relationship
Before you begin
- Applies to:Domain-joined Windows 11 Pro or Enterprise and Windows Server 2022 or 2025 member servers. Domain controllers and Entra-only devices require separate procedures.
- Where to start:Sign in on the affected machine with a verified local administrator account and open elevated PowerShell 7 or later.
- What you need:Use the real domain, host, and account values in the examples. Keep the same shell open for commands that share variables.
Guide tools
Use this guide when Windows reports that the trust relationship between the workstation and the primary domain failed. The secure channel uses the computer account. A user password reset will not repair a broken computer channel.
Troubleshooting Steps
Confirm domain membership and DNS
Local clientRun on the affected computer. The device should report PartOfDomain as True. If it does, check that the active adapter uses the organization’s AD resolvers and that the domain’s LDAP SRV lookup returns expected controllers.
Get-CimInstance Win32_ComputerSystem | Select-Object Name, Domain, PartOfDomainGet-DnsClientServerAddress -AddressFamily IPv4Resolve-DnsName -Name '_ldap._tcp.dc._msdcs.corp.example.com' -Type SRVCheck controller discovery and clock
DependenciesReplace the sample domain and controller. A controller lookup should return a valid DC name. Inspect the time source and synchronization status. If DNS, VPN routing, or time is broken, fix that dependency and retest before attempting repair.
nltest.exe /dsgetdc:corp.example.comw32tm.exe /query /status$Dc = 'dc01.corp.example.com'Test-NetConnection -ComputerName $Dc -Port 389Test the member’s secure channel
DiagnosisRun elevated on the affected member. True means the test succeeded. False with healthy prerequisites points to a channel problem. Ask the AD team to confirm the computer object is present and enabled and investigate duplicate names, recent restore, or conflicting state across controllers.
Test-ComputerSecureChannel -Server $Dc -VerboseRepair the confirmed channel and retest
Approved changeUse a named account delegated to repair the computer account. If repair reports False or errors, stop and collect the Netlogon events and controller name. If it succeeds, rerun the read-only test and test a fresh domain sign-in while connected to the network. Schedule a restart only if required by your recovery procedure.
$Credential = Get-Credential -Message 'Enter the delegated domain repair account'if (Test-ComputerSecureChannel -Repair -Server $Dc -Credential $Credential -ErrorAction Stop) { Test-ComputerSecureChannel -Server $Dc -Verbose} else { throw 'Secure channel repair returned False. Review Netlogon and AD evidence.'}References
Your feedback keeps these production procedures accurate and battle-tested.