Export messages from a transport queue to file system for manual replay
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Export-MessageQueue.ps1
LICENSE.md
README.md

README.md

Export-MessageQueue.ps1

Export messages from a transport queue to file system for manual replay

Description

This script suspends a transport queue, exports the messages to the local file system. After successful export the messages are optionally deleted from the queue.

This script utilizes the GlobalFunctions library https://github.com/Apoc70/GlobalFunctions

Parameters

Queue

Full name of the transport queue, e.g. SERVER\354 Use Get-Queue -Server SERVERNAME to identify message queue

Path

Path to folder for exported messages

DeleteAfterExport

Switch to delete per Exchange Server subfolders and creating new folders

Examples

.\Export-MessageQueue -Queue MCMEP01\45534 -Path D:\ExportedMessages

Export messages from queue MCMEP01\45534 to D:\ExportedMessages and do not delete messages after export

.\Export-MessageQueue -Queue MCMEP01\45534 -Path D:\ExportedMessages -DeleteAfterExport

Export messages from queue MCMEP01\45534 to D:\ExportedMessages and delete messages after export

Note

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

TechNet Gallery

Download and vote at TechNet Gallery

Credits

Written by: Thomas Stensitzki

Stay connected:

For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos