หน้าหลัก » คลังความรู้ » วิธีแก้ปัญหา “The trust relationship between this workstation and the primary domain failed” ใน Windows

วิธีแก้ปัญหา “The trust relationship between this workstation and the primary domain failed” ใน Windows




หลายคนที่ใช้งานคอมพิวเตอร์ที่เชื่อมต่อกับ Active Directory Domain อาจเคยเจอข้อความ error ตอน login ว่า “The trust relationship between this workstation and the primary domain failed

The trust relationship between this workstation and the primary domain failed

ปัญหานี้เกิดจากเครื่อง Client ไม่สามารถยืนยันความสัมพันธ์ (Trust Relationship) กับ Domain Controller (DC) ได้ ทำให้ผู้ใช้ไม่สามารถเข้าสู่ระบบด้วยบัญชีโดเมนได้

วิธีแก้ไข: ซ่อม Trust Channel ด้วย PowerShell

1.เข้าคอมพิวเตอร์ด้วย Local Administrator (เช่น .\Administrator)

2.เปิด PowerShell (Run as Administrator)

3.รันคำสั่ง

Test-ComputerSecureChannel -Repair -Credential DOMAIN\AdminUser
  • เปลี่ยน DOMAIN\AdminUser เป็นบัญชีที่มีสิทธิ์ join domain ได้ เช่น Domain Admin

ตัวอย่าง โดเมนคือ ABC.local และบัญชีที่มีสิทธิ์ join domain ได้คือ Administrator พิมพ์คำสั่ง ดังนี้

Test-ComputerSecureChannel -Repair -Credential ABC.local\Administrator

4.จะมีหน้าจอ Windows PowerShell credential request ให้ใส่รหัสผ่านของบัญชีที่มีสิทธิ์ join domain ในข้อ 3

The trust relationship between this workstation and the primary domain failed

5.ถ้าสำเร็จ จะได้ผลลัพธ์ True → จากนั้นผู้ใช้สามารถ login ด้วย domain account ได้ตามปกติ

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\WINDOWS\system32>Test-ComputerSecureChannel -Repair -Credential ABC.local\Administrator
True

หมายเหตุ หากทำตามแล้วยังไม่สามารถใช้งานได้ อาจจะต้องทำการ รีจอยน์ (Re-Join) Domain ใหม่อีกครั้ง