If you've restored or "rolled back" a PC running Windows 7, Windows 8, or Vista then you may have run into this error message  “the trust relationship between this workstation and the primary domain failed”.\nIn order to fix this the first thing you need to do is login with a local account as opposed to a domain account.  The reason for this is simple, the server no longer trusts you so you can't authenticate any domain users.\nTo do this on Windows7 for the username you will need to use .administrator or .USERNAME  (where USERNAME) is a valid local user name.  Unfortunately if you do not know these then you must use a Windows7 password reset utility first.\nOnce you have logged in as a local user you need to download RSAT for windows7 this will allow you to run the netdom command- http://www.microsoft.com/en-us/download/details.aspx?id=7887\nOnce it is downloaded you must go into the control panel to actually enable it.  Go to add remove windows components then browse to this location.\nIn the treeview, go to Remote Server Administration Tools -> Role Administration Tools -> AD DS and AD LDS Tools and select AD DS Tools. Click OK.\nOnce this is complete run the following command to reset the trust with your server\nnetdom.exe resetpwd /s:DomainControllerName /ud:domainDomainAdmin /pd:* \nReplace DomainControllerName with the name of a valid domain controller and replace domainDomainAdmin with your domain name and valid domain administrator account.  You are now finished.  Reboot the PC.\n \nThere is also a second method for fixing this error.  It is to login as a local administrator account remove the PC from the domain reboot and then add it back.  This will however reset your users' profiles.\n