On Your Own: Lab 30 Using ADSI and Subs, and Creating Users

In this lab, you will expand the script used in this chapter. Instead of creating only a user, you will add information to the user. You will use a subroutine to perform logging.

Lab Instructions

  1. Open Notepad.exe.

  2. Open the CreateUsers.vbs file and save it as Lab30Solution.vbs.

  3. Make sure you have a file called UsersAndGroups.txt, and run the Lab30Solution.vbs file. Go into Active Directory Users and Computers and delete the users that were created.

  4. Cut the code used to open the text file that holds the names of users to add to Active Directory. It is under the variable declarations, in the Reference information section of the script. It is five lines long. This code looks like the following: ...

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.