The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.
Your current command is useful for monitoring queues that contain messages, but MessageCount -gt 0 alone does not necessarily indicate a delivery problem. Some queues can contain messages normally, including ShadowRedundancy queues.
ShadowRedundancy is part of Exchange's transport high-availability mechanism, so the presence of messages in these queues does not by itself indicate a delivery problem. For routine delivery monitoring, I would generally exclude ShadowRedundancy queues when looking for queues that require investigation. However, a continuously growing or persistently backed-up ShadowRedundancy queue may still warrant further investigation.
For monitoring queues that may require attention, you can specifically check for queues in Retry or Suspended status:
Get-ExchangeServer | ForEach-Object {
Get-Queue -Server $_.Name |
Where-Object {
$_.Status -in @('Retry','Suspended') -and
$_.DeliveryType -ne 'ShadowRedundancy'
} |
Select-Object Server,Identity,DeliveryType,Status,MessageCount,
NextHopDomain,LastError,LastRetryTime,NextRetryTime
}
This gives you the queue status, message count, next-hop destination, and the last error information that can help when investigating queues that are not progressing normally.
You can read more at Queue filters: Exchange 2013 Help | Microsoft Learn
You can also use Get-QueueDigest to get an aggregated view of queues across the DAG:
Get-QueueDigest -Dag DAG01
For example, to identify queues with more than 100 messages:
Get-QueueDigest -Dag DAG01 -Filter "MessageCount -gt 100"
The value 100 is simply an example threshold, you can adjust it according to the normal message volume in your environment.
To specifically identify queues in Retry status:
Get-QueueDigest -Dag DAG01 -Filter "Status -eq 'Retry'"
Reference: Procedures for queues | Microsoft Learn
I hope this information is helpful.