Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 506

How to Import PST Files into Mailboxes with Exchange 2010 SP1

$
0
0

In a recent article we looked at how to export mailboxes to PST file with Mailbox Export Requests for Exchange Server 2010 SP1.  In this article we'll look at the process for importing PST files into mailboxes.

In Exchange Server 2010 SP1 importing PST files into mailboxes is performed using Mailbox Import Requests. These are similar to export requests in that they are processed by a Client Access server.

Because multiple Client Access servers can exist in a site there is no way to determine which one will process the request, therefore the PST file to import must be accessible via the UNC path of shared folder.

The account that is performing the import also needs to be explicitly granted the rights to do so, as no accounts have this right by default (even Organization administrators).

Granting User Rights for Mailbox Imports in Exchange 2010 SP1

The first step is to grant the right to import mailboxes to an account in your organization.  In the Exchange Management Shell run the following command.

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User Administrator

If you're logged with that user already simply restart your Exchange Management Shell session to be granted access to the new cmdlets.

Creating a Network Share for Mailbox Imports in Exchange 2010 SP1

Next we need to create the network share that will be used as the file path for the PST files to be imported.  All that is required here is a network share that the Exchange Trusted Subsystem group has read/write permission to.

Importing a PST File with an Exchange Server SP1 Mailbox Import Request

To import a PST file to a mailbox we use the New-MailboxImportRequest cmdlet.  In this example the PST file alan.reid.pst is being imported into John Smith's mailbox.

[PS] C:\>New-MailboxImportRequest -FilePath \esp-ho-ex2010apstalan.reid.pst -Mailbox john.smith

In some cases you might prefer to import the PST file into sub-folder of the mailbox. You can do this by adding the -TargetRootFolder parameter to the command.

[PS] C:\>New-MailboxImportRequest -FilePath \esp-ho-ex2010apstalan.reid.pst -Mailbox john.smith -TargetRootFolder "Mailbox - Alan Reid"

The import request will create the target folder and begin importing the PST file contents into it.

You can view the status of the mailbox import request using the Get-MailboxImportRequest cmdlet.

[PS] C:\>Get-MailboxImportRequest

Name                                           Mailbox                                        Status
----                                           -------                                        ------
MailboxImport                                  exchangeserverpro.net/Company/Users/Head Of... InProgress

By piping Get-MailboxImportRequest into Get-MailboxImportRequestStatistics you can also monitor the progress of the import.

[PS] C:\>Get-MailboxImportRequest | Get-MailboxImportRequestStatistics

Name                                   Status                    TargetAlias                           PercentComplete
----                                   ------                    -----------                           ---------------
MailboxImport                          InProgress                john.smith                            10

Importing PST Files into Personal Archives in Exchange Server 2010 SP1

Another way to use mailbox import requests is to import PST files directly into personal archive mailboxes. This is very useful for organizations who want to get rid of all PST files on the network.  All you need to do is add the -IsArchive parameter to the command when importing the PST file to a mailbox user who has been enabled for archiving.

[PS] C:\>New-MailboxImportRequest -FilePath \esp-ho-ex2010apstarchive.pst -Mailbox alan.reid -IsArchive

Completing the Mailbox Import Request

When a mailbox import request is completed it remains on the server until it is removed by an administrator using Remove-MailboxImportRequest.

To see all of the completed mailbox import requests run this command.

[PS] C:\>Get-MailboxImportRequest | where {$_.status -eq "Completed"}

Name                                           Mailbox                                        Status
----                                           -------                                        ------
MailboxImport                                  exchangeserverpro.net/Company/Users/Head Of... Completed

And to clear all completed mailbox import requests from Exchange run the following command.

[PS] C:\>Get-MailboxImportRequest | where {$_.status -eq "Completed"} | Remove-MailboxImportRequest

The post How to Import PST Files into Mailboxes with Exchange 2010 SP1 appeared first on Practical 365.


Viewing all articles
Browse latest Browse all 506