Ran into a case where we had some delivery issues to our O365 hybrid tenant, and realized I’d never figured out a good way to take a look at all of the queues at once, and lets face it, the Exchange Toolbox Queue Viewer tool is just…sad at this point. I mean it works, but I want to know what the entire environment is doing at a glance and what our message velocity looks like. This is where the following quick script comes into play.
It’s designed to be run out of an already-connected Exchange 2013 powershell prompt, so connect using your usual method or go take a look at Chris Lehr’s blog for an awesome tool to manage your connectivity needs.
When you run it, you’ll get a screen that constantly refreshes (so you can toss it into 1 window/corner of your monitor and just let it run) and it will look similar to this:
It’s pretty simple and straight forward at this time. I have it saved as “get-messagequeuestatus.ps1” in my network script repository for use from any machine.
while($true) { cls get-date Get-ExchangeServer | Get-Queue | where {$_.MessageCount -gt 0} | sort MessageCount -Descending | ft -a sleep 10 }
I may make some enhancements in the future for color coding, requesting a certain refresh rate, etc. but for now, it’s quick and dirty and works.