The trust relationship between this workstation and the primary domain failed
The computer’s machine account password no longer matches Active Directory, so domain logins fail.
Seen on:
Windows
Meaning
Restoring a VM snapshot/old image, a duplicate computer name, or the PC being offline for a very long time makes the secure channel break. Rejoining or resetting the secure channel fixes it.
Common causes
- VM restored from an old snapshot
- Computer account reset or deleted in AD
- Duplicate computer name / cloned image without sysprep
- Very long time offline
⚡ Quick fix
- Log in with a local admin and reset the secure channel
- Or rejoin the domain
- Avoid restoring old snapshots of domain members
Detailed fix by platform
PowerShell
- powershell
Test-ComputerSecureChannel -Repair -Credential (Get-Credential DOMAIN\admin) # or Reset-ComputerMachinePassword -Credential (Get-Credential DOMAIN\admin)
How to diagnose
- AD — Computer object exists/enabled?
- Snapshot — Restored recently?
- Name — Duplicates?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Windows
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026