I want to remove two-way trust using netdom trust command on Windows Server 2012 r2, I am using "Run as Administrator" command prompt but still getting "Access Denied"

Here is my command

netdom trust testrelm.test /d:testrelm.test /remove /UserD:admin /PasswordD:Password

Can anyone point me what is wrong in this command or reason for "Access Denied"?

  • There are different levels of "admin" permissions. Try with at least Domain admin, and if that fails then Enterprise Admin? NETDOM is a rather old tool, may or may not have been update for 2012. What happens if you try removing the trust with the Domains & Trusts MMC (domain.msc)? – Clayton Jan 27 '16 at 14:34
  • I can remove trust using domain.msc but want to use command line for scripting purposes. Is there any command for replacing netdom ? – Abhijeet Kasurde Jan 27 '16 at 15:26
  • Try the GUI once to determine if you have a perm problem, or a tool problem. If it is a problem with NETDOM, use google 'fu for "powershell domain trust" – Clayton Jan 27 '16 at 15:46
  • When entering your credential, are you including the domain to ensure it's not using the local admin? The membership of the account should be Domain/Enterprise admin Otherwise, i don't see any problems with your syntax. Netdom should still be valid for W2k12 ---> (Remove a trust - technet.microsoft.com/en-ca/library/cc771137.aspx) – Lex Feb 1 '16 at 21:51
  • @Lex Admin is member of Domain/Enterprise user. – Abhijeet Kasurde Feb 2 '16 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.