Lab 25 Using the Event Log

In this lab, you modify the delete user script from Lab 24 and write the resulting output to the event log instead of to a pop-up dialog box. This gives us an enterprise type of solution because the script could be scheduled, or the script might delete a large number of users, in which case writing output to a dialog box or even to a command prompt would be impractical. The event log always exists, so it is a convenient place to log information. Only three lines of code are required to implement writing to the event log.

Lab Instructions

  1. Open Notepad.exe.

  2. Open the Lab25Starter.vbs file, and save it as Lab25Solution.vbs. This will ensure you have a fresh working copy of the script and will give you a fallback option if required. ...

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.