Fix trust relationship between workstation and primary domain

The following solution was tested on a Windows 10 Professional workstation joined to an Active Directory domain.

When a domain-joined PC loses its secure channel with the domain controller, you’ll see this error at login. Rather than removing and re-joining the machine to the domain (the traditional fix), you can resolve it quickly using PowerShell — no reboot required.


Step 1: Reset the Computer’s Domain Password

Open PowerShell as Administrator and run:

powershell
Reset-ComputerMachinePassword -Server DomainServer -Credential DomainName\UserName

Replace DomainServer with your domain controller name and DomainName\UserName with your domain admin credentials.


Step 2: Test the Trust Relationship

Verify the secure channel is intact with:

powershell
Test-ComputerSecureChannel -Verbose

This will return True if the trust relationship is healthy.


Step 3: Repair the Secure Channel (if needed)

If the test returns False, repair the channel with:

powershell
Test-ComputerSecureChannel -Repair -Credential DomainName\UserName

Again, substitute DomainName\UserName with your domain admin credentials.


💡 Tip: This approach is significantly faster than the traditional fix of unjoining and rejoining the domain, and it avoids the reboot that method requires.