For more information and code examples that show how to remove an entire sub-tree of objects from the directory, see Removing Active Directory Nodes.