Monitoring Hub Transport Server

Monitoring the queue is one of the important tasks in the Daily Exchange Server Check list.

  I have identified and modified a script for monitoring the Transport Queues on all the Hub servers .I have tested this output. This script runs on all hub servers and then it triggers an output email to the given recipients. Below are the screenshots and the script which will be helpful to us in terms of monitoring the Queue in the exchange 2007 & 2010.


Output of the HTML result.


Also this can be sent to a recipient email address and here is the  sample output of an test performed ‘




Below is the Script file 



$Msg = new-object


$msg.IsBodyHtml = $True


$msg.Body = $Queue


$msg.Subject = “Hub Transport Queue Information”






$msg.From = “”


$SmtpClient = new-object


$smtpclient.Host = ‘’





$Queue = Get-TransportServer | Get-Queue | Select Identity,DeliveryType,Status,MessageCount,NextHopDomain,LastRetryTime, NextRetryTime | ConvertTo-Html -head $BodyStyle



$BodyStyle | Out-File C:\scripts\QueueInfo.html


$BodyStyle = “<style>”


$BodyStyle = $BodyStyle + “BODY{background-color:peachpuff;}”


$BodyStyle = $BodyStyle + “TABLE{border-width: 1px;border-style: solid;

border-color: black;border-collapse: collapse;}”


$BodyStyle = $BodyStyle + “TH{border-width: 1px;padding: 0px;

border-style: solid;border-color: black;background-color:thistle}”


$BodyStyle = $BodyStyle + “TD{border-width: 1px;padding: 0px;

border-style: solid;border-color: black;background-color:PaleGoldenrod}”


$BodyStyle = $BodyStyle + “</style>”







Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: