O'Reilly logo

Exchange Server Cookbook by Devin L. Ganger, Missy Koslosky, Paul Robichaux

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.12. Listing the SMTP Queues on a Specific Virtual Server

Problem

You need to list the SMTP queues associated with a specific virtual server instance on your Exchange server.

Solution

Using a graphical user interface

  1. Open the Exchange System Manager (Exchange System Manager.msc).

  2. Expand the organization Administrative Groups target administrative group Servers.

  3. Expand the appropriate server container and select the Queues object.

  4. The right pane will display all queues on this server, including MTA, SMTP, and foreign connector queues.

  5. Click the Source field of the header to group the queues according to the component they are associated with and locate the SMTP virtual server.

Using VBScript

' This code enumerates the SMTP links and queues on an 
' Exchange Virtual Server and only works on Exchange Server 2003.

' ------ SCRIPT CONFIGURATION ------
' host name of the Exchange server
strHostname = "<ExchangeServerName>" ' e.g., red-exch02
' The number of the SMTP virtual server instance
strVSInstance = "<VSInstanceNumber>" ' e.g., 1 for the default SMTP virtual server ' ------ END CONFIGURATION --------- ' Get the Exchange Namespace WMI object Set objWMIExch = GetObject("winmgmts://./root/MicrosoftExchangeV2") ' Get the list of Exchange_SMTPLink instances from the default virtual server ' and iterate through them. Set objLinksList = objWMIExch.ExecQuery ("Select * from Exchange_SMTPLink" &_ " Where VirtualMachine='" & strHostname &_ "' And VirtualServerName='" & strVSInstance & "'") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required