0

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"?

5
  • 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, 2016 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 ? Jan 27, 2016 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, 2016 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, 2016 at 21:51
  • @Lex Admin is member of Domain/Enterprise user. Feb 2, 2016 at 5:16

0

You must log in to answer this question.