Active Directory Trust Relationship

I fired up a virtual machine on my lab server today to do some tests around Citrix and I got the well know message that "The trust relationship between this workstation and the primary domain failed."

I got this because my server had been offline for a long time and thus hadn't connected to any domain controller.

To fix this issue you can use the powershell command Reset-ComputerMachinePassword  that is available on Windows Server 2012 R2. To my opinion this is the faster way to fix the issue comparing to leaving the domain and joining again or the method using NETDOM.

So, you have to do the following:

  1. Log in to the server using a local user with administrator privileges
  2. Start powershell with administrator privileges (Run As Administrator)
  3. Run the above command (Reset-ComputerMachinePassword)
  4. Restart the server (Restart-Computer)
That's it!

Popular posts from this blog

Domain Controller Machine Password Reset

Configuring a Certificate on Exchange Receive Connector

Verbose Parameter Passing to cmdlet inside Function