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.13. Inspecting the Contents of a Queue

Problem

You need to enumerate the contents of a queue, or examine a specific message in a queue.

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 that they are associated with and find the appropriate SMTP virtual server.

  6. Click on a queue to select it and click Find Messages, or double-click the queue to open the search window. By default, the search will return 100 messages at a time.

  7. If you wish to restrict the search, modify the search parameters.

  8. Click Find Now.

  9. Double-click on a message in the results pane to view its details.

Using VBScript

' This code enumerates the messages within a given queue.
' ------ SCRIPT CONFIGURATION ------
' The host name of the Exchange server
strHostname = "<ExchangeServerName>" ' e.g., red-exch02
' Name of the SMTP queue to search for messages
strQueueName = "<SMTPQueueName>" ' e.g., 3sharp.com ' ------ END CONFIGURATION --------- ' Get the Exchange Namespace WMI object Set objWMIExch = GetObject("winmgmts://" & strHostname &_ "/root/MicrosoftExchangeV2") ' Get the list of queues and process our desired queue Set objQueuesList ...

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