WinDeveloper IMF Tune

WinDeveloper IMF Tune
WinDeveloper IMF Tune
  • Home
  • ExMerge
  • Improved Mailbox Import/Export in Exchange 2010 SP1

Improved Mailbox Import/Export in Exchange 2010 SP1

Kenneth Spiteri

Kenneth Spiteri Photo

Kenneth is an Exchange Administrator who loves to share anything he finds interesting with the rest of the community. He also helps with the administration of the site.

Cast your Vote
Poor Excellent

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:

MailboxImportRequest

Cmdlet Description
New-MailboxImportRequest Start an import operation from a PST to a mailbox
Get-MailboxImportRequest View mailbox import details
Set-MailboxImportRequest Change the options of an import request
Suspend-MailboxImportRequest Suspend an import request
Resume-MailboxImportRequest Resume a suspended import request
Remove-MailboxImportRequest Remove an import request
Get-MailboxImportRequestStatistics View a more detailed set of import stats

MailboxExportRequest

Cmdlet Description
New-MailboxExportRequest Start an export operation from a mailbox to a PST
Get-MailboxExportRequest View mailbox export details
Set-MailboxExportRequest Change the options of an export request
Suspend-MailboxExportRequest Suspend an export request
Resume-MailboxExportRequest Resume a suspended export request
Remove-MailboxExportRequest Remove an export request
Get-MailboxExportRequestStatistics View 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:
http://technet.microsoft.com/en-us/library/ff601762(EXCHG.141).aspx

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:

    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:
    \\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

  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"

    New-RoleGroup

  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:

Mailbox

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:

Get-MailboxImportRequest

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.

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

letspartee 1 Mar 2019 17:37
Excellent instructions - thank you!
MADMAC 12 Mar 2013 11:41
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.
Copyright © 2005 - 2024 All rights reserved. ExchangeInbox.com is not affiliated with Microsoft Corporation