20 August 2014

Find and delete mail messages in queue

To find messages that are in queue:

Get-Message -Queue "server_name\submission" | where {$_.status -eq "Retry"} -Queue "server_name\submission" | where {$_.status -eq "Retry"}


to delete messages:

Get-Message -Queue "server_name\submission" | where {$_.status -eq "Retry"} | Remove-Message -WithNDR $false 

No comments:

Post a Comment