Tayyip EserIT KNOWLEDGE HUB
TRin
Back to archive

Documentation · Aug 25, 2026

Repairing a domain trust relationship

Testing and repairing the secure channel without immediately removing the computer from the domain.

Active DirectoryPowerShellTroubleshooting

Goal Diagnose the workstation trust relationship error with a secure-channel test before removing the computer from the domain.

01

Requirements

  • Local administrator access
  • Permission to read the AD computer object
  • DNS and network access to a domain controller
02

Test the secure channel

Open an elevated PowerShell session. False means the local computer-account password no longer matches Active Directory.

Test-ComputerSecureChannel -Verbose
Result

True: healthy. False: continue with repair.

03

Verify DNS and DC discovery

The client must use the organization’s DNS service. Fix DNS, time or connectivity before repairing trust.

ipconfig /all
nltest /dsgetdc:<DOMAIN_NAME>
w32tm /query /status
04

Repair the channel

Use an authorized domain credential, then restart the device.

Test-ComputerSecureChannel -Repair -Credential (Get-Credential) -Verbose
Restart-Computer
!

Caution

Treat domain removal and rejoin as a last resort. Confirm working local-administrator access first.