In this article we’ll look at the new import and export mailbox improvements in Exchange 2010 SP1. We look at what is required to carry out the process and walkthrough a mailbox import/export operation to/from a PST file.

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:

Prerequisites

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:

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:
\\EXCHSRV\C$\PST\RachelPeach2010.pst

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

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"

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"

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.

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:

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:

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:

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.

Conclusion

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.

User Comments - Page 1 of 1

How can we export daily PSTs but with only whats in the users mailbox for that day?

Ernesto
31 Jan 2013 07:18

Awesome explanation! Thank you.

BD Hodge
29 Aug 2012 19:32

Wow!! Finally someone with the correct directions!! What a pain in the butt. They seriously changed this completely with the Service Pack, and the old commands no longer work. Nice. Whatever. I'm just glad I finally found the resolution to this.

stascom
27 Jan 2012 02:50

because support calls are $250 per incident ;)

ExchangeAdmin
25 Oct 2011 01:04

Thanks for that very helpful article. I was about to order an Outlook 64-bit when I read your post.

John V
26 Sep 2011 17:42

Now if they only made import and export a right click on the mail box they would have something.

Why is it that as Microsoft moves forward we lose more features to command line. It is only going to lead to more support calls ss people mis-type.