Fix trust relationship between workstation and primary domain

The following solution worked on a Microsoft Windows 10 Professional workstation.

You can reset the computer password using the PowerShell cmdlet Reset-ComputerMachinePassword. This is the fastest and most convenient way to reset the password of a computer and doesn’t require reboot.

Reset-ComputerMachinePassword -Server DomainServer -Credential DomainName\UserName

To test a trust relationship use Test-ComputerSecureChannel.

Test-ComputerSecureChannel -Verbose

You can also repair secure channel between computer and Active Directory domain using PowerShell cmdlet Test-ComputerSecureChannel.

Test-ComputerSecureChannel -Repair -Credential DomainName\UserName

Source(s)