Platform SDK: Active Directory, ADSI, and Directory Services

Deleting a User

To delete a user from a domain, you need to bind to the container containing the user and specify "user" as the class using IADsContainer::Delete. You do not need to call IADs::SetInfo to commit the change to the container. The IADsContainer::Delete call commits the deletion of the user directly to the directory.

Using C/C++, you can also bind to the container and use the IDirectoryObject::DeleteDSObject method.