Share via


Export Mailbox Data

You can use the Export-Mailbox cmdlet to export mailbox data to another target mailbox or to a .pst file. You can export data from a single mailbox to a .pst file, or you can export data from multiple mailboxes to other mailboxes. There are a few reasons why you might want to export mailbox data:

  • Remove one or more messages from mailboxes   If a sensitive message was inadvertently sent to the wrong recipients, you can use the export mailbox process to remove those messages from the specified mailboxes.
  • Compliance requirements   You can use the export mailbox process to export mailbox content for legal discovery.
  • Create a point-in-time mailbox snapshot   You might want to create a snapshot for certain mailboxes without the need to retain the entire backup set for a mailbox database.

Looking for other management tasks related to importing or exporting mailbox data? Check out Managing Mailbox Import and Export.

Note

You can't use the Export-Mailbox cmdlet to export recoverable items. To learn more about recoverable items, see Understanding Recoverable Items.
You can only export data from one mailbox at a time to a .pst file.

Prerequisites

Use the Shell to export data from mailboxes

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Import\Export mailbox" entry in the Mailbox Permissions topic.

Note

You can't use the EMC to export data from mailboxes.

This example exports the special folders and empty folders of the mailbox user john@contoso.com to the folder MyData on the mailbox ExportMailbox.

Export-Mailbox -Identity john@contoso.com -TargetMailbox ExportMailbox -TargetFolder MyData

This example exports data to the john.pst file located at C:\PSTFiles.

Export-Mailbox -Identity john@contoso.com -PSTFolderPath C:\PSTFiles\john.pst

This example exports data received between February 2, 2009, and February 15, 2009, to a .pst file.

Export-Mailbox -Identity john@contoso.com -StartDate "02/02/09" -EndDate "02/15/09" -PSTFolderPath C:\PSTFiles\john.pst

This example exports data to the target mailbox ExportMailbox from the Sent Items folder of John's mailbox.

Export-Mailbox -Identity john -IncludeFolders '\Sent Items' -TargetFolder 'John Sent Items' -TargetMailbox ExportMailbox

This example excludes the Junk E-mail and Contacts folders from the export.

Export-Mailbox -TargetMailbox ExportMailbox -TargetFolder MyData -ExcludeFolders "\Junk E-mail","\Contacts"

By using filters, this example specifies the following items in the source mailbox to include in the export:

  • Content of the items contains the keyword merger.
  • Messages either came from or were delivered to tony@fabricam.com.
  • Attachment file names contain the word orgchart.
  • All files from March 1, 2009, to present will be exported.
Export-Mailbox -Identity contoso\john -TargetMailbox ExportMailbox -TargetFolder MyData -ContentKeywords "merger" -AttachmentFilenames "*orgchart*" -StartDate "03/01/2009 12:01:00" -RecipientKeywords tony@fabrikam.com

For detailed syntax and parameter information, see Export-Mailbox.