Windows cannot delete object LDAP  :// name of my server and container of old server DC.  Access is denied.

In Windows Server 2008 R2, We can achieve to clear the metadata of orphaned Domain Controller by simply deleting the DC server object in Active Directory.

But when we try to delete the orphaned DC in the active directory then the error mentioned that Windows cannot delete object LDAP  :// name of my server and container of old server DC.  Access is denied.

activedirectory_orphaneddomain_removal

Basically this problem may occurs when you attempt to delete the object that has enabled by Protect object from accidental deletion. If you’re a member of the  Administrators group on a domain controller (DC), you can perform the following steps to delete the Domain Controller object.

1. Start the Active Directory Users and Computers snap-in (go to Start, Programs, Administrative Tools, Active Directory Users and Computers) or the AD snap-in that listed the object that you can’t delete.

2. Navigate to the Domain controller container.

3. Right-click the Domain controller which you want to delete, then select Properties from the displayed context menu.

4. Select the Object tab and uncheck the “Protect object from accidental deletion” check box.

6. Click OK to save your changes.

accidental_removal_domain_controller

Now you will be able to delete the domain controller from Active Directory Users and Computers. Also click on “NTDS Settings” in General tab of DC object Properties. Make sure that “Protect from accidental deletion” is not checked.