For more information and code examples that show how to remove objects from the directory, see Removing Active Directory Nodes.