Hello,
Thank you so much for posting here.
As mentioned, we have PC1 lost trust with dc1.domain.com. Then we will encounter the error message "The trust relationship between this workstation and the primary domain failed" when logging on PC1.
If so, to resolve the error message, we can run the command **Netdom resetpwd /s:target_server /ud:mydomain\domain_admin /pd:***on the PC1.
/s:server is the name of the domain controller to use for setting the machine account password. This is the server where the KDC is running. /ud:domain\User is the user account that makes the connection with the domain you specified in the /s parameter. This must be in domain\User format. If this parameter is omitted, the current user account is used. /pd:* specifies the password of the user account that is specified in the /ud parameter. Use an asterisk (*) to be prompted for the password.
For example, my domain name is a.local:
Or we could choose to reset the secure connection between a workstation and a domain controller using Netdom reset. Syntax is
**NETDOM RESET machine [/Domain:domain] [/Server:server] [/UserO:user] [/PasswordO:[password | *]] [/SecurePasswordPrompt]**
say user account name is X, computer name is PC1, Domain name is : domain.com, server name : dc1
so
netdom reset PC1 /d:domain.com /S:dc1 /U:X /P:*
(and run it on the DC)
As for user, specifies the user account to use to make the secure connection with the computer that you want to reset. If you do not specify this parameter, then netdom reset uses the current user account. We could choose to use domain admin.
For any question, please feel free to contact us.
Best regards, Hannah Xiong
============================================ If the Answer is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hi,
You are welcome.
Thank you for sharing your experience and solution here. It will be very beneficial for other community members who have similar questions. Your support is greatly appreciated.
Thanks so much and have a nice day.
Best regards,
Hannah Xiong