Lab 29 Combining WMI and ADSI in a Script

In this lab, you combine the WMI script created in Lab 28 with an ADSI script.

Lab Instructions

  1. Open Notepad.exe.

  2. Open the Lab29Starter.vbs file.

  3. Open the ConnectToADOU.vbs file.

  4. Save the ConnectToADOU.vbs file as Lab29Solution.vbs.

  5. Copy the seven variable declarations from the Lab29Starter.vbs file and paste them into the Header information section of your Lab29Solution.vbs script. The seven variable declarations look like the following:

    Dim target
    Dim oWMIService
    Dim colNetAdapters
    Dim oNetAdapter
    Dim DNSDomainErr
    Dim DNSsearchErr
    Dim DNSServer
  6. In your Lab29Solution.vbs file, locate the While Not...Wend section of the script. Remove the WScript.Echo portion of the WScript.Echo oRecordSet.Fields("name") command. ...

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.