Searching Exchange 2007 submission queues

Let’s say you’ve got some message in some Submission queue on some server (some ambiguity, huh?), and you need to find it based off the subject. Oh, and in this example, all your E12 hub servers have HUB in the servername, and the subject of the mail in question contains “Doogalis” ...

[PS] C:\> Get-TransportServer | where {$_.Identity -like "*HUB*"} | foreach {get-queue -server $_.Identity} | where {$_.MessageCount -gt 0} | get-message | fl Subject | findstr "Doogalis"