1 minute reading time
(208 words)
Azure VM - The trust relationship between this workstation and the primary domain failed
How to fix error "The trust relationship between this workstation and the primary domain failed" when trying to connect to an Azure VM
The trust relationship between this workstation and the primary domain failed
Check the domain connection using PowerShell Test-ComputerSecureChannel
You can run the Test-ComputerSecureChannel PowerShell command to check the secure channel between the computer and the domain.
Test-ComputerSecureChannel -verbose
Virtual Machine
Run Command - RunPowerShellScript
Enter the PowerShell command
Run
In this example, the computer has lost its connection to the domain, and we get the error message "The secure channel between the local computer and the domain is broken"
Steps to fix: Trust relationship between this workstation and the primary domain failed
To fix this, we will need to remove and re-join the computer to the domain.
- Sign in with local admin user account
- Remove the computer from the domain
- Check the AD computer object has been removed
- Restart VM and re-join to domain
- Move the computer object into the correct Active Directory OU
You have to use computer-name\domain-name to sign in to the VM locally using the local admin user account.
Comments