Introduction – Listing the members of the Users container
This script enumerates all the Administrators in the Builin container. If you like to learn by changing items in the code, well here is a challenge for you, adapt my script to list members of your OU.
- Copy the entire Script in the green box below.
- Paste it into notepad.exe.
- File (menu), Save as AdminList.vbs. Note: This is where people go wrong, remember the .vbs extension.
- Double click AdminList.vbs
‘Script to List all the Administrators in the Builtin container
‘Script created by Guy Thomas
‘Feel free to adapt names
Set objGroup = GetObject _
("LDAP://cn=Administrators, cn=Builtin, dc=CP,dc=com")
For each objMember in objGroup.Members
- Alter the cn=Administrators to the name of another group. Note it must be the name of a real group.
- Alter the cn=Builtin to OU=yourou. Note you use OU here not
cn. Its an organization unit not a container.
Import users from a spreadsheet. Just provide a list of the users with their fields in the top row, and save as .csv file. Then launch this FREE utility and match your fields with AD’s attributes, click and import the users.
Optionally, you can provide the name of the OU where the new accounts will be born. Download your FREE bulk import tool.
If you need more comprehensive software, download a free trial of SAM (Server & Application Monitor)