How to fix “the trust relationship between this workstation and the primary domain failed”

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”.
In 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.
To 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.
Once you have logged in as a local user you need to download RSAT for windows7 this will allow you to run the netdom command-
Once 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.
In the treeview, go to Remote Server Administration Tools -> Role Administration Tools -> AD DS and AD LDS Tools and select AD DS Tools. Click OK.
Once this is complete run the following command to reset the trust with your server
netdom.exe resetpwd /s:DomainControllerName /ud:domainDomainAdmin /pd:* 
Replace 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.
There 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.

Creating a bootable USB drive for Windows 7 installs

  1. Insert your thumb drive.  Open explorer right click on it and go to format.  Make sure your drive is larger than 3gb and use format using NTFS.
  2. Download mrbwiz Extract it wherever you want.
  3. Open a command prompt and browse to the mbrwiz directory.
  4. Run this command mbrwiz /list Note the number of your USB disk.
  5. Now run this command mbrwiz /disk=X /active=1 Where X is your drive number from step 4.
  6. Now change your directory on your command prompt to the Windows 7 CD.  Then browse to the boot directory.
  7. Type in this command bootsect /nt60 Y: Where Y: is the drive letter of your USB drive.
  8. Now copy all the files from your windows 7 DVD to the USB drive.  This should be around 3GB.
  9. Now set your computer that you want to install Windows 7 to USB priority.