Donnerstag, 12. Mai 2011

Improved Mailbox Import/Export in Exchange 2010 SP1

As mentioned in my previous article, An Overview of Exchange 2010 SP1, the latest Exchange service pack brings some new enhancements to the way Exchange Administrators will import and export data to/from PST files.

Note: All the information is based on the SP1 BETA released in June 2010 (version 14.01.0180.002). Please keep in mind that things may change by the time this reaches final release.

A bit of History

If you've been around long enough, you will remember the ExMerge.exe utility that allowed to import and export data to/from Exchange mailboxes. Introduced in the days of Exchange 4.0, ExMerge stuck around till Exchange 2007 was released. This introduced the Import-Mailbox and Export-Mailbox cmdlets intended to replace ExMerge. The new cmdlets did not allow exporting of mailboxes to PSTs until the release of Exchange 2007 SP1. Even then, and in Exchange 2010 RTM after that, there was a requirement to have Outlook installed, because Exchange relied on the Outlook MAPI provider. In fact, to use the Export-Mailbox cmdlet in Exchange 2010 you have to have Outlook 2010 x64 installed on the same machine (as Alexander Zammit explains in his article Exchange 2010 Import-Mailbox and Export-Mailbox).

Exchange 2010 SP1 removes the requirement to have Outlook x64 installed by including an in-built MAPI provider. This is probably going to be one of the most welcomed additions to this improved piece of functionality.

The new Import and Export cmdlets

Let us now take a look at the new cmdlets available for the MailboxImportRequest and MailboxExportRequest commands and a small description for each:


New-MailboxImportRequestStart an import operation from a PST to a mailbox
Get-MailboxImportRequestView mailbox import details
Set-MailboxImportRequestChange the options of an import request
Suspend-MailboxImportRequestSuspend an import request
Resume-MailboxImportRequestResume a suspended import request
Remove-MailboxImportRequestRemove an import request
Get-MailboxImportRequestStatisticsView a more detailed set of import stats


New-MailboxExportRequestStart an export operation from a mailbox to a PST
Get-MailboxExportRequestView mailbox export details
Set-MailboxExportRequestChange the options of an export request
Suspend-MailboxExportRequestSuspend an export request
Resume-MailboxExportRequestResume a suspended export request
Remove-MailboxExportRequestRemove an export request
Get-MailboxExportRequestStatisticsView a more detailed set of export stats

When using the New-MailboxExportRequest cmdlet, you can also specify the -ContentFilter parameter with special properties that allow you to export only those messages that meet certain criteria. More information on the -ContentFilter parameter can be found at:


There are a number of requirements that need to be met to ensure that the Import or Export process goes smoothly. These include:

  • The Microsoft Exchange Mailbox Replication service needs to be started. This service handles the import/export requests.

  • The Exchange Trusted Subsystem Security Group should be granted Full Control permissions on the folder where the PST files will reside:

    Folder Permissions

  • When specifying the PST file path, you have to use the UNC format (even if the file is stored locally). For example the UNC path for the file c:\PST\RachelPeach2010.pst, on a server named EXCHSRV:

    Here I am using the C$ administrative share. Of course you can create shares manually and change the path accordingly.

  • The administrator that is going to perform the import or export needs to have appropriate permissions in Exchange. Follow the instructions in the section that follows to configure the required permissions.

Configuring Import / Export Permissions

  1. You first need to create a group that grants access to the Import and Export cmdlets. The command to do this is:
    New-RoleGroup "Mailbox Import Export Group" -Roles "Mailbox Import Export"


  2. Next, you will need to add the administrator (and other designated users) to the role group. The command to do this is:
    Add-RoleGroupMember "Mailbox Import Export Group" -Member "Administrator"

  3. That's it! You are now ready to start the import/export process.

Importing from a PST

We will now look at an example of how to import a mailbox from a PST.

When importing from a PST the cmdlet itself takes care of ensuring that subfolders are carried over too. By default, it also checks for duplicates in the target mailbox so that items will not be imported twice.

Below is an image showing Rachel Peach's mailbox prior to running the New-MailboxImportRequest cmdlet:


To import Rachel's PST into her mailbox, we can run the following command:
New-MailboxImportRequest -Mailbox "Rachel Peach" -FilePath \\win2008srv01\c$\PST\RachelPeach2010.pst

The image below shows Rachel Peach's mailbox with the new items that were imported from the PST:

PST Import

If you wish to import the e-mails into the Personal Archive of a user, specify the -IsArchive parameter at the end of the cmdlet, like this:
New-MailboxImportRequest -Mailbox "Rachel Peach" -FilePath \\win2008srv01\c$\PST\RachelPeach2010.pst -IsArchive

If you wish to specify which folder you'd like the e-mails to be imported to, specify the -TargetRootFolder parameter at the end of the cmdlet, like this:
New-MailboxImportRequest -Mailbox "Rachel Peach" -FilePath \\win2008srv01\c$\PST\RachelPeach2010.pst -TargetRootFolder "Imported"

To check the status of the import request, we can use the Get-MailboxImportRequest cmdlet:


Exporting a Mailbox to a PST

Finally, we'll look at how to export a mailbox to a PST using the New-MailboxExportRequest cmdlet. Below is an image showing Rachel Peach's mailbox prior to exporting the mailbox:

Mailbox before Export

To initiate a mailbox export request, we will have to use the following command:
New-MailboxExportRequest -Mailbox "Rachel Peach" -Filepath "\\win2008srv01\c$\PST\RachelPeachMailboxJuly2010.pst"

We can check the status of this export request by using the Get-MailboxExportRequest cmdlet. The image below shows the RachelPeachMailboxJuly2010.pst in the C:\PST folder, as well as opened in Microsoft Outlook 2010:

Exported PST

Exported PST Outlook2010

Exporting Multiple Mailboxes

If you wish to export multiple mailboxes into a respective PST file, you can do so using a simple script, as shown below:
foreach ($mbx in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $mbx -FilePath "\\win2008srv01\c$\PST\$($mbx.Alias).pst" }

What we're doing here is looping through each mailbox and running the New-MailboxExportRequest cmdlet while using the mailbox Alias to compile a unique name for each PST.


As we have seen, the New-MailboxImportRequest and New-MailboxExportRequest cmdlets are going to make the Exchange Admins lives much easier. The fact that Outlook 2010 x64 doesn't need to be installed is a welcomed addition that should eliminate some of the frustration that was built around the Import-Mailbox and Export-Mailbox cmdlets in Exchange 2010 RTM.

Keine Kommentare:

Kommentar veröffentlichen

Rename Onedrive Business root folder

Rename Onedrive Business root folder Here is what I remember: In the Office 365 web admin pages, change the organization name to a shorte...