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

Popular posts from this blog

E15 CU3–Update Failed–AD replicated Exceeded the tombstone lifetime.

202301 - Exchange onpreme - PowerShell Serialization Payload Signing

E14–Bulk Create Mail Contact & Set-Contact