- August 18, 2018
- Posted by: Surender
- Category: Tips & Tricks, Windows PowerShell
If you ever got the message “The trust relationship between this workstation and the primary domain failed”, you probably have solved this my removing the computer from domain and re-joining it to domain. But I will show you a really easy and neat way of solving this error by using Windows PowerShell.
Because of this error, you cannot login onto domain using any user account but you can always login via local administrator account.
To fix this error, follow these steps:
- Login into the server or computer via local administrator account.
- Open elevated Windows PowerShell console.
- Type the following command and hit enter
Reset-ComputerMachinePassword -Server DC1 -Credential MyDomain\Administrator
You will be prompted to enter the password of above account securely via PowerShell. Just type the password and hit enter. Of course, replace DC1 with your domain controller and MyDomain\Administrator with your domain and domain admin account.
- Restart the computer and now you will be able to login onto domain.