<# View the properties of a message that is currently queued for delivery. The following example tabulates the sender address, recipients, 
    subject, and received date information for all messages that are currently in retry state:
#>

# Other Options are: 
# Active ( If the message is in a delivery queue, the message is being delivered to its destination. If the message is in the Submission queue, the message is being processed by the categorizer)
# Pending Remove ( The message has been deleted by the administrator but was already in delivery. The message will be deleted if the delivery ends in an error that causes the message to re-enter the queue. Otherwise, delivery will continue)
# Pending Suspend ( The message has been suspended by the administrator but was already in delivery. The message will be suspended if the delivery ends in an error that causes the message to re-enter the queue. Otherwise, delivery will )
# Ready (The message is waiting in the queue and is ready to be processed.)
# Last Error (This field shows the last error that was recorded for a message.)
# Suspended (The message has been suspended by the administrator.)
#

Get-Message  -Server FA1RVWAPXX398 -IncludeRecipientInfo -Filter {Status -eq "Retry"} | Format-Table FromAddress,Recipients,Subject,DateReceived

<# Queues

·         Get-Queue

·         Resume-Queue

·         Retry-Queue

·         Suspend-Queue

Messages

·         Get-Message

·         Remove-Message

·         Resume-Message

·         Suspend-Message

·         Export-Messages


a.      To get all the queues with MessageCount Greater Than 100

Get-queue –Filter {MessageCount –gt 200}

b.      To get all the queues with LastError not equal to $Null

Get-Queue –Filter {LastError –ne $Null}

c.       And the list can go on… Common Comparison Operators 


Note Get-Queue only gets the queue on the local server. 
You will have to use Get-ExchangeServer | Where { $_.ServerRole –like “*transport*”} or Get-ExchangeServer | where {$_.isHubTransportServer -eq $true } 
or something similar to look at all Server Queues.

#>