Repair the trust relationship between this workstation and the primary domain failed

Before you execute the command you need to test the security channel

Test-ComputerSecureChannel -Repair -Credential (Get-Credential)
netdom resetpwd /server:domainserver /userd:domain\username /passwordD:*