On Your Own: Lab 24 Deleting Users

In this lab, you will practice deleting users. You begin with a starter file that was used to create the user. This is a good practice because you can ensure that all created users get deleted when the time comes. While working on your script, if you need to run the script several times, you can use the Lab24Starter.vbs file to create your user prior to deleting the user. If the user isn’t present when you try deletion, you get an error.

Lab Instructions

  1. Open Notepad.exe.

  2. Open Lab24Starter.vbs.

  3. Delete the declaration for the variable objUser.

  4. Delete three of the four lines that call objUser in the Worker information section of the script. These lines look like the following:

    objUser.Put "sAMAccountName", oUname objUser.Put ...

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.