Can't delete OU....it's NOT delete-protected

JRV 551 Reputation points
2020-10-16T20:32:03.577+00:00

I have a small AD domain with one 1st-level OU that cannot be deleted. It has no child objects anymore.

My account is a Domain Admin and Enterprise Admin.

There's no Delete, Move, Cut or Rename command on the OU's Context menu or the MMC Action menu, with or without "View as containers" enabled. Other OUs offer the normal commands; it's specific to this one.

Here are all the things that haven't worked:

"Protect from accidental deletion" is turned off. Have also turned it on, click Apply, and turned it off and clicked OK.

If I try to delete from GPMC, I get "Access is denied".

I've reset the ACL in Properties/Security/Advanced.

I've checked Effective Permissions on the OU for my account in Properties/Security/Advanced; all are Allow.

I've logged on to the DC as <DOMAIN>\Administrator and tried.

I've issued this command in an elevated PS session--

Remove-ADOrganizationalUnit -Identity "OU=OUName,DC=DOMAIN,DC=LOCAL" -Recursive 

--which produces this output--

Remove-ADOrganizationalUnit : The requested delete operation could not be performed
At line:1 char:1
+ Remove-ADOrganizationalUnit -Identity "OU=OUName,DC=DOMAIN,DC=LOCAL" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (OU=OUName,DC=DOMAIN,DC=LOCAL:ADOrganizationalUnit) [Remove-AD
   OrganizationalUnit], ADException
    + FullyQualifiedErrorId : ActiveDirectoryServer:8398,Microsoft.ActiveDirectory.Management.Commands.RemoveADOrganiz
   ationalUnit

My next instinct is to try with ADSIEDIT, but I don't want to mangle the domain in the process. Next step?

Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,629 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,726 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,910 questions
{count} votes

Accepted answer
  1. Anonymous
    2020-10-16T22:59:20.667+00:00

    It may be a default OU. Try setting the default to some other container / OU

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Hannah Xiong 6,286 Reputation points
    2020-10-19T02:20:07.08+00:00

    Hello,

    Thank you so much for posting here.

    1, We are wondering whether the OU is built-in or manually created. If it is the default OU, there will be no Delete, Move, Cut or Rename command on the OU's Context menu as shown below. While if manually created, there are these commands.

    33126-1.png

    33079-2.png

    2, In my test, if the OU is protected object from accidental deletion, we will get "Access is denied" when trying to delete it from GPMC. Once unchecking this option, the manually created OU could be deleted.

    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.

    0 comments No comments

  2. JRV 551 Reputation points
    2020-10-21T14:06:48.897+00:00

    @Anonymous , my next site visit is not yet scheduled but I will check. I'd be really surprised if it was set as a default OU but maybe it is. One never knows what one will find in small biz IT.

    @Anonymous , the OU was manually created, and, again, delete protection is NOT enabled.

    0 comments No comments

  3. Anonymous
    2020-10-21T14:10:50.087+00:00

    Sounds good, let us know.

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments

  4. JRV 551 Reputation points
    2020-12-04T20:25:02.31+00:00

    @Anonymous , it only took me 3 months to circle back to this! You were right: The undeletable OU was set as the default Computer OU. I set it back to domain.local\Computers and was able to delete the previously-default OU.

    Thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.