REF: E14 Mailbox Role – Part 5 - Importing and Exporting Mailbox Data

 

Importing and Exporting Mailbox Data

E2K7 開始提供的功能

 

Mailboxes can be exported to another target mailbox or to a .pst file. There are a few 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 ExcludeFoldersparameter. The special folders include:

  • Inbox
  • Deleted Items
  • Drafts
  • Junk E-Mail
  • Outbox
  • Sent Items
  • Journal
  • Calendar
  • Contacts
  • Notes
  • Tasks 

You can't export the Recoverable Items folder with the Export-Mailbox cmdlet.

Permissions to Import or Export Mailbox Data

You must have the correct permissions to import or export mailboxes. By default, none of the pre-loaded 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.

New-ManagementRoleAssignment -Name "Import Export_Enterprise Support" -SecurityGroup "Enterprise Support" -Role "Mailbox Import Export"

If you try to run the Import-Mailbox or Export-Mailbox cmdlets and you do not have permission, you will get an error stating that the cmdlet doesn't exist. In addition, You will need to restart the Exchange Management Shell after you add the Mailbox Import Export role to the role group.

image 

待測

Prerequisites to Import or Export mailbox data

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 a PST file.
  • 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 Outlook 2010 or later
  • 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 is on a server running Exchange Server 2003 or Exchange 2007. To import data from a .pst file to a mailbox on a server that is 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 is 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 does not have a mailbox.
Importing Mailbox Data

Using the Import-Mailbox cmdlet, you can import data into a mailbox. The mailbox that you are 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 is the PST file, all messages from the transport dumpster are imported. The Import-Mailboxcmdlet 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 is merged into the existing mailbox. If a message from the .pst file already exists, it will not be imported as a duplicate message.

Exporting Mailbox Data

Mailboxes can be exported to another target mailbox or to a .pst file by using the Export-Mailbox cmdlet in the Exchange Management 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 do not specify the TargetMailboxparameter, 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.

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-Mailboxcmdlet then deletes messages on the target mailbox that do not match the keyword criteria. If you also use the DeleteContent parameter,Export-Mailbox will then delete the messages that match the keyword criteria from the source mailbox.

Where Data Is Exported

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 does not exist, it will be created.

 

Blog Extended Reading

More Information & Reference

1. Understanding Importing and Exporting Mailbox Data
2. Exchange 2007 - How to Import Mailbox Data

image

Comments

Popular posts from this blog

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

202301 - Exchange onpreme - PowerShell Serialization Payload Signing

Ticket: RemoteAPP certificate revocation check error