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:
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.pstHere 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.
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:
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.
Keine Kommentare:
Kommentar veröffentlichen