Exchange 2013 learning note 7: mailbox import and export


1、 User mailbox export

1.1. Create a PST folder on disk D, share it and authorize “exchange trusted subsystem” to read and write.

1.2. On the exchange server DC1, click the windows start menu, find “exchange manager shell”, and then click.

1.3. The exchange server administrator who performs import and export operations must be “mailbox import and export role”. By default, no users or groups in the exchange messaging system belong to this role. Set the domain management user administrator to the mailbox import and export role by using the following command.

New-ManagementRoleAssignment -Name "Import Export_Domain Admins" -User "Administrator" -Role "Mailbox Import Export"

1.4. Restart the exchange manager shell and enter the following command to set the [email protected] The mailbox of is exported to the PST shared folder.

New-MailboxExportRequest -Mailbox it02 -FilePath "\DC1\PST\it02.pst"

1.5. Through the following command, you can view the newly created export request list.


1.6. If you have completed the request of exporting the mailbox, you can delete it through the following command.

Remove-MailboxExportRequest -Identity "it02\MailboxExport"

1.7. Related examples:

1) Example 1: export the primary mailbox of user Ayla KOL to a. PST file on the network shared folder pstfileshare of server01.

New-MailboxExportRequest -Mailbox AylaKol -FilePath "\SERVER01\PSTFileShare\Ayla_Recovered.pst"

2) Example 2: export the user Kweku’s archive to a. PST file on the network shared folder pstfileshare of server01.

New-MailboxExportRequest -Mailbox Kweku -FilePath "\SERVER01\PSTFileShare\Kweku_Archive.pst" -IsArchive

3) Example 3: export messages containing “company” and “profit” in the body of messages received by user Tony before January 1, 2012.

New-MailboxExportRequest -Mailbox Tony -ContentFilter {(body -like "*company*") -and (body -like "*profit*") -and (Received -lt "01/01/2012")} -FilePath "\SERVER01\PSTFileShare\Tony_CompanyProfits.pst"

4) Example 4: export all messages in Kweku’s in box to the. PST file inplacehold.

New-MailboxExportRequest -Mailbox Kweku -IncludeFolders "#Inbox#" -FilePath "\SERVER01\PSTFileShare\Kweku\InPlaceHold.pst"

2、 User mailbox import

2.1. Use the following command to import the it02.pst file to [email protected] In the mailbox.

New-MailboxImportRequest -Mailbox it01 -FilePath "\DC1\PST\it02.pst" -TargetRootFolder "it02"

2.2. Log in to outlook web app with linkto / IT01, and you can see that the mailbox data of it02 has been successfully imported.

2.3. Through the following command, you can view the newly created import request list.


2.4. You can delete the mailbox import request through the following command.

Remove-MailboxImportRequest -Identity "it01\MailboxImport"

Note: Microsoft Exchange can automatically generate up to 10 unique names for mailbox import requests. If you want to create more than 10 import requests for a mailbox, you need to specify a unique name when creating import requests, or delete the existing import requests first. Therefore, after the import request is completed, it can be cleared.

2.5. Related examples:

1) Example 1: import the “in tray” data from the recovered. PST file in server01 into the recovered files folder of Ayla’s target mailbox.

New-MailboxImportRequest -Mailbox Ayla -FilePath \SERVER01\PSTFiles\Recovered.pst -TargetRootFolder "RecoveredFiles" -IncludeFolders "#Inbox#"

2) Example 2: import the. PST file into Kweku’s archive folder. Because targetrootfolder is not specified, the contents under the existing folder will be merged. If the target folder structure does not contain these contents, a new folder is created.

New-MailboxImportRequest User2 -FilePath \server\share\User1.pst -IsArchive -TargetRootFolder /

3) Example 3: import all. PST files on a shared folder. Name each. PST file name after the corresponding user’s alias. This command creates an import request for all. PST files and imports the data into the matching mailbox.

Dir \SERVER01\PSTshareRO\Recovered\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -Mailbox $_.BaseName -FilePath $_.FullName -TargetRootFolder SubFolderInPrimary}


Reference from: