Export (0) Print
Expand All

Understanding Importing and Exporting Mailbox Data

Topic Last Modified: 2010-01-05

Mailboxes can be exported to another target mailbox or to a .pst file. The following are reasons why you might want to import or export mailbox data:

  • Remove one or more messages from mailboxes   If a sensitive message was inadvertently sent to incorrect recipients, the export mailbox process can be used to remove those messages from the specified mailboxes.
  • Compliance requirements   The export mailbox process can be used to export the contents of mailboxes for legal discovery and import them into a special mailbox used for compliance purposes.
  • 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.

By default, Exchange exports and imports all empty folders, special folders, and subfolders to the target location. To specify folders to either include in or exclude from the export, use the IncludeFolders or ExcludeFolders parameter. The special folders include:

  • Inbox
  • Deleted Items
  • Drafts
  • Junk E-Mail
  • Outbox
  • Sent Items
  • Journal
  • Calendar
  • Contacts
  • Notes
  • Tasks
Ee633455.note(en-us,EXCHG.140).gifNote:
You can't use the Export-Mailbox cmdlet to export the Recoverable Items folder.

Contents

Permissions to Import or Export Mailbox Data

Prerequisites to Import or Export Mailbox Data

Importing Mailbox Data

Exporting Mailbox Data

You must have the correct permissions to import or export mailboxes. By default, none of the preloaded role groups have the Mailbox Import Export role. You must add the Mailbox Import Export role to a role group. For more information, see Add the Mailbox Import Export Role to a Role Group.

If you try to run the Import-Mailbox or Export-Mailbox cmdlets and you don't have the correct permissions, you'll receive an error stating that the cmdlet doesn't exist. In addition, you'll need to restart the Exchange Management Shell after you add the Mailbox Import Export role to the role group.

Return to top

Before you can import or export mailboxes, the following prerequisites must be met:

  • To export data to a .pst file, be aware that you can only export one mailbox at a time.
  • To import or export data, you must perform the task against a 64-bit computer that has the following installed:
    • Exchange Server 2010 role
    • 64-bit Microsoft Outlook 2010
  • To use the Export-Mailbox cmdlet, the source mailbox and the target mailbox must be in the same forest. You can't export data from a mailbox in one forest to a mailbox in a different forest. For more information about moving mailboxes across forests, see the following topics:
  • You can't use the Import-Mailbox cmdlet to import data to a mailbox that's on a server running Exchange Server 2003 or Exchange Server 2007. To import data from a .pst file to a mailbox on a server that's running Exchange 2003, you must use the Microsoft Exchange Server Mailbox Merge wizard (ExMerge.exe). To import data from a .pst file to a mailbox on a server that's running Exchange 2007, you must first move the mailbox to an Exchange 2010 server. For more information, see Create a Local Move Request.
  • You can't import data to a public folder or public folder database.
  • The mailbox that you're importing the data to must exist. You can't import data to a user account that doesn't have a mailbox.

Return to top

Using the Import-Mailbox cmdlet, you can import data into a mailbox. The mailbox that you're importing data into can be different from the one it was exported from. For example, you can export data from john@contoso.com and import it into legaldiscovery@contoso.com.

The Import-Mailbox cmdlet imports all associated folder messages if they exist in the .pst file. Associated messages contain hidden data with information about rules, views, and forms. If they exist in the .pst file, all messages from the transport dumpster are imported. The Import-Mailbox cmdlet imports all message types, including messages, calendar items, contacts, distribution lists, journal entries, tasks, notes, and documents. When data is imported from a .pst file, it's merged into the existing mailbox. If a message from the .pst file already exists, it won't be imported as a duplicate message.

Return to top

Mailboxes can be exported to another target mailbox or to a .pst file by using the Export-Mailbox cmdlet in the Shell. You can only export a single mailbox at a time.

You can use the Export-Mailbox cmdlet to delete associated messages or to include associated messages in the export process. Associated messages contain hidden data with information about rules, views, and forms. If you use the DeleteContent parameter and don't specify the TargetMailbox parameter, you can delete content from the source mailbox without exporting it to another mailbox.

You can filter the messages that are exported based on recipients and senders. To filter on recipients, use the RecipientKeywords parameter. To filter on the sender, use the SenderKeywords parameter.

Ee633455.note(en-us,EXCHG.140).gifNote:
If you use any keyword parameters, the Export-Mailbox cmdlet will first export all of the messages, including messages in the dumpster, and then search the target mailbox for messages that meet the keyword criteria. Messages that were in the dumpster on the source mailbox are converted to regular messages in the Deleted Items folder on the target mailbox and will also be searched for keywords. The Export-Mailbox cmdlet then deletes messages on the target mailbox that don't match the keyword criteria. If you also use the DeleteContent parameter, the Export-Mailbox cmdlet will then delete the messages that match the keyword criteria from the source mailbox.

You must specify a destination mailbox by using the TargetMailbox parameter. You must also specify a folder on the destination mailbox where you want to export data by using the TargetFolder parameter. The TargetFolder parameter specifies the top-level mailbox folder that will be created on the destination mailbox. This folder will contain a subfolder called Recovered Data - <source mailbox alias> - <date time stamp>. The subfolder contains the exported folders and messages within those folders.

If the target folder that you specify already exists on the target mailbox, the exported data will be added to the existing folder. If the target folder doesn't exist, it will be created.

Return to top

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft