Friday, April 29, 2016

Exporting Messages from Transport Queues

Hi folks,

In this short post I would like to share with you on how do you need to export messages from Exchange 2010 (and later version) to file. Usually it is in eml format (that can be opened by Outlook).

First we need to suspend message and we can achieve it by running command similar to this one:

Get-Message SERVER01\Submission\123456789 |Suspend-Message

After a message has been suspended we export it to eml format by running the following command:

Get-Message SERVER01\Submission\123456789 |Export-Message |AssembleMessage -path D:\ML\123456789.eml

If we have more than one message in the queue we can run the following command against each of them:

Get-Message -Queue Server01\Submission |Suspend-Message

After this we can run the second command against each message that we suspended. Of course identity of each message will vary depending on what it is in real life.

Enjoy!