X

Select Your Currency

Euro $ US Dollar £ British Pound
X

Select Your Currency

Euro $ US Dollar £ British Pound
❄️ Winter Launch: Get 50% OFF First Month on 8GB+ RAM NVMe VPS Plans! Use Code: WELCOME50

The Sysadmin's Nightmare: Fixing the "Trust Relationship Failed" Error in 2 Simple St...

HomepageArticlesServer SolutionsThe Sysadmin's Nightmare: Fixing th...

How to Fix "Trust Relationship Failed" Error in Windows Server (2 Methods)

You try to RDP into a critical Windows Server, but instead of the desktop, you're greeted by this error message:

"The trust relationship between this workstation and the primary domain failed."

Don't panic. You do not need to format the server. This error usually happens when the secure channel password between the server and the Active Directory Domain Controller falls out of sync (often due to restoring old snapshots or long offline periods).

Here are the two fastest ways to fix it without losing data.


Method 1: The PowerShell Fix (No Reboot Required)

This is the professional way. It fixes the secure channel instantly without needing to remove the server from the domain or rebooting.

  1. Log in to the server using the Local Administrator account.
  2. Open PowerShell as Administrator.
  3. Copy and paste the following command:
Test-ComputerSecureChannel -Repair -Credential (Get-Credential)

What to do next:

  • A pop-up will appear. Enter the credentials of a Domain Admin user.
  • If the result says True, the issue is fixed. You can now log in with domain users immediately.

Method 2: The "Rejoin" Method (Requires Reboot)

If PowerShell doesn't work, use the classic GUI method. This involves removing the server from the domain and adding it back.

WARNING: Ensure you know the Local Administrator password before proceeding. Otherwise, you will be locked out permanently!

  1. Log in as Local Administrator.
  2. Open Run (Win + R), type sysdm.cpl, and press Enter.
  3. Click Change... and switch from "Domain" to Workgroup (type any name, e.g., TEMP).
  4. Click OK and Restart the server.
  5. After reboot, go back to sysdm.cpl > Change...
  6. Select Domain again and type your domain name (e.g., company.local).
  7. Enter Domain Admin credentials when prompted.
  8. Restart one last time.

Avoid This Headache in the Future

This error is often caused by outdated snapshots or time synchronization issues. To ensure stability for your critical workloads, hardware reliability is key.

Need Reliable Windows Hosting?

Run your applications on ErkmenHost's NVMe Windows VPS infrastructure. Isolated resources, high uptime, and enterprise-grade hardware eliminate common stability issues.

View Windows VPS Plans


Top