E14–HUB export queue to EML
http://www.msdigest.net/2014/04/how-to-export-messages-from-a-mail-queue-on-exchange/
#Suspend all messages in the queue
get-queue ExchangeServer\663 | Get-Message | Suspend-Message
#Get all messages from the queue
$array = @(Get-Message -Queue "ExchangeServer\663" -ResultSize unlimited)
#Export all messages from the queu
$array | ForEach-Object {$i++;Export-Message $_.Identity | AssembleMessage -Path ("E:\Mailqueue\"+ $i +".eml")}
Comments
Post a Comment