Fix domain trust relationship
If the computer object is still present in AD you can fix the relationship.
Test-ComputerSecureChannel -Verbose
Test-ComputerSecureChannel -Verbose -Server dc.contoso.local
Test-ComputerSecureChannel -Verbose -Repair -Server dc.contoso.local -Credential contoso.local\username
Test-ComputerSecureChannel -Verbose -Repair -Credential (Get-Credential)
The command has to run as a local administrator of the client and as a user with permissions over the computer object in AD. You can open a powershell terminal with local adminsitrator and temporally grant the user permissions over the computer object.
If the computer has been restored from an old backup, you may need to reset the machine account password for the computer:
netdom resetpwd /Server:dc.contoso.local /UserD:contoso.local\username /PasswordD:*
Reset-ComputerMachinePassword -Verbose -Server dc.contoso.local -Credential contoso.local\username
If this fails you can unjoin the domain and join again.
- Microsoft's Reset-ComputerMachinePassword
- Microsoft's Test-ComputerSecureChannel
- SS64's netdom documentation