Exchange – Hub Transport Queue Viewer

In Exchange you have a queue viewer to see whats going on but if you running a lot of servers you will need to open up the queue viewer on each server or connect to each one which can make it quite frustrating when you need to check whats happening on all servers. I wrote this small PowerShell script that basically shows the submission, active and retry queues across all servers in one screen.

Queue Viewer

At a glance you can see what is going on, to drill into a particular server you will need to use the Native Exchange Queue Viewer for now, i am still working on that part which will be released in V2 of the script.

In the script you will find lines as follows:

(Active Queues) richtextbox1.Text = Get-Queue -server Hub -Filter { Status -eq “Active” -and MessageCount -gt 10 } | Format-Table -AutoSize | Out-String

(Submission Queues) $richtextbox1.Text = Get-Queue -server Hub -Filter { Status -eq “Ready” -and MessageCount -gt 10 } | Format-Table -AutoSize | Out-String

(Retry Queues) $richtextbox1.Text = Get-Queue -server Hub -Filter { Status -eq “Retry” -and MessageCount -gt 5 } | Format-Table -AutoSize | Out-String

You need to open this script with notepad or your application of choice and replace the server names with your own.

You will also need to update the lines that import the PSSession and enter in your server name, replace hub.domain.com with your own server name.

$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionURI http://hub.domain.com/powershell/ -Authentication Kerberos

If you get any errors regarding assemblies (They are included in the script) you can run the following from an elevated PowerShell window:

Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName PresentationFramework

This will allow the script to run without issue. Running this on Server 2012 and R2 gives you a nice interface, whereas on 2008 R2 it gives a different look but functions the same.

You can download the script over at Technet Gallery.

https://gallery.technet.microsoft.com/Monitor-Exchange-Queues-on-d7588a2f

Hope it helps.

Views All Time
Views All Time
Views Today
Views Today
Advertisements

Leave a Reply

Your email address will not be published. Required fields are marked *