Managing User Accounts by Enumeration
Microsoft® Windows® 2000 Scripting Guide
Another way to manage multiple user accounts is to enumerate a containers contents by using the IADsContainer interface. Enumeration is the process of returning a list of objects in a container.
IADsContainer is a multipurpose interface that is used to complete a number of user account management tasks, such as:
Using the Create method of IADsContainer to create a user account (demonstrated in "Creating User Accounts" earlier in this chapter)
Using the MoveHere method to move and rename a user account (demonstrated in "Moving and Renaming User Accounts" earlier in this chapter).
Using the Delete method of IADsContainer to remove a user account (demonstrated in "Deleting User Accounts" earlier in this chapter.
Combining these methods and the methods of the IADs interface with the ability of the IADsContainer interface to enumerate a container allows you to manage multiple user accounts.