Lab 41 Using the Exchange_Mailbox Class
In this lab, you create a script that connects to the MicrosoftExchangeV2 namespace and queries the Exchange_Mailbox class.
Lab Instructions
Open Notepad.exe.
On the first line of a new file, type Option Explicit.
Save your file as Lab41Solution.vbs.
You need to declare six variables: strComputer, wmiNS, wmiQuery, objWMIService, colItems, and objItem. The completed Header information section of your script will look like the following:
Option Explicit 'On Error Resume Next Dim strComputer Dim wmiNS Dim wmiQuery Dim objWMIService Dim colItems Dim objItem
Assign the variable strComputer to be equal to ".". This line of code will look like the following:
strComputer = "."
Assign the variable wmiNS to be equal to "
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.