You want to delete a container or organizational unit and all child objects contained within.
126.96.36.199 Using a graphical user interface
Open ADSI Edit and follow the same steps as in Recipe 4.20. The only difference is that you'll be prompted to confirm twice instead of once before the deletion occurs.
188.8.131.52 Using a command-line interface
> dsrm "<ObjectDN>" -subtree
184.108.40.206 Using VBScript
The same code from Recipe 4.20 will also delete containers and objects contained within them.
As you can see from the solutions, there is not much difference between deleting a leaf node versus deleting a container that has child objects. However, there is a distinction in what is happening in the background.
Deleting an object that has no children can be done with a simple LDAP delete operation. On the other hand, to delete a container and its children, the tree-delete LDAP control has to be used. If you were to do the deletion from an LDAP-based tool like LDP, you would first need to enable the "Subtree Delete" control, which has an OID of 1.2.840.1135220.127.116.115. LDP provides another option to do a "Recursive Delete" from the client side. That will essentially iterate through all the objects in the container, deleting them one by one. The Subtree Delete is much more efficient, especially when dealing with large containers.
4.21.4 See Also
Recipe 4.20 for deleting objects and MSDN: IADsDeleteOps::DeleteObject