The error: the trust relationship between this workstation and the primary domain failed pops up relatively frequently and the standard fix most practice is to simply remove the machine from the domain and rejoin. There is however a much easier way.
Follow these steps to fix the error.
Use the Reset-ComputerMachinePassword cmdlet from Powershell v3!
Run the script from PowerShell v3
Reset-ComputerMachinePassword [-Credential <PSCredential>] [-Server <String>]
Powershell v3 ships with the latest version of Windows but can also be downloaded direct from Microsoft’s website at this link: http://www.microsoft.com/en-us/download/details.aspx?id=34595
If you are running PowerShell from a Windows 8 machine remember to run as with administrative rights and run command update-help as well.
Thanks to Dan Peterson over at implbits.com – http://www.implbits.com/about/blog/tabid/78/post/don-t-rejoin-to-fix-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/default.aspx