Repair a Windows PC domain connection

22nd October 2026

Error Message: The trust relationship between this workstation and the primary domain failed

This needs to be done from the console of PC as it will ask for credentials and there is no way to supply them from the command line. (not this way)

Powershell:

Test-ComputerSecureChannel -Repair -Credential (Get-Credential) -verbose