Connecting to MicrosoftExchangeV2

To use WMI to retrieve information from Exchange 2003, you need to make a connection into the MicrosoftExchangeV2 namespace, which is even easier to work with than the IIS namespace. As you will soon see, the MicrosoftExchangeV2 namespace is very logically laid out, and the scripts will rapidly become redundant. The only trick to using the namespace is finding the data you want to retrieve.

The Exchange_QueueSMTPVirtualServer Class

For the first code sample (ExchangeSMTPQueue.vbs), consider the Exchange_Queue-SMTPVirtualServer class, which returns properties for SMTP queue virtual servers. ExchangeSMTPQueue.vbs is shown here:

Option Explicit On Error Resume Next Dim strComputer Dim wmiNS Dim wmiQuery Dim objWMIService ...

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.