The error “The trust relationship between this workstation and the primary domain failed” indicates that the secure channel between a domain-joined computer and the domain controller is no longer valid. This typically occurs when the computer account password is out of sync with the domain or when the computer account in Active Directory has been deleted, corrupted, or modified unexpectedly.
To resolve this issue, you can repair the secure channel using either Command Prompt or PowerShell, as outlined below:
- Using Command Prompt
- Sign in using the local administrator account.
Open Command Prompt with administrative privileges.
Verify the secure channel:
netdom verify ComputerName /domain:YourDomainName
Reset the computer account password:
netdom resetpwd /server:DomainControllerName /userd:Domain\Username /passwordd:*
Reset the secure channel with the domain:
netdom reset /domain:YourDomainName /userd:DomainUsername /passwordd:*
Restart the machine.
- Using PowerShell
Sign in with the local administrator account.
Launch PowerShell as an administrator.
Test the secure channel:
Test-ComputerSecureChannel
If the result is False, repair the secure channel:
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
Reset the computer account password:
$credential = Get-Credential
Reset-ComputerMachinePassword -Credential $credential
Restart-Computer -Force
I hope this helps clarify the situation. If you find this answer useful, please hit “Accept Answer” so I know your issue is resolved 😊.
Jason.