Monday, February 29, 2016

How to Import Multiple PST files in Exchange 2010

Importing a PST file directly in Exchange 2010 mailboxes is not an easy task , as a lot of additional settings need to be modified before the execution of PowerShell like permissions granting, creating a network share folder for importing multiple PST files, and bunch of cmdlets for completing the job successfully. 

 So in this article, I’m sharing the right process to import a single PST file to user’s primary mailbox and users achieve mailbox. And also the way to import multiple PST file in Exchange server 2010. Have a look-

Assign permission

The very first step which you need to do is permission granting because import export functionality (by default disabled) will not be enabled until the 'Mailbox Import Export' role is assigned to ExchangeAdmin user. In this article I am granting permission to ExchangeAdmin user so that he can use cmdlets to import a PST file, as the cmdlets are not available if the required permissions are not assigned. The error message prompts if permission is not granted-

“Exchange is unable to establish a connection to the target mailbox”

So logon as main administrator account and run the below command to enable the import export functionality by assigning permission to ExchangeAdmin user-

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User ExchangeAdmin
Now permission has been granted to Exchange Admin, and he can open Exchange Management Shell to run PowerShell commands.

Importing PST file to User’s Primary Mailbox

The below example imports a PST file data into Peter’s primary mailbox

New-MailboxImportRequest –Mailbox Peter –FilePath \\Server01\PST-Files\peter.pst

You can also use Get-MailboxImportRequest and Get-MailboxImportRequestStatistics cmdlets to monitor the import request status.

Get-MailboxImportRequest | Get-MailboxImportRequestStatistics | ft MailboxName,Percent*,BytesTransferred*

Import PST file into a User’s archive

Similarly, if you want to export a PST file into a user’s archive folder, run the below PowerShell

New-MailboxImportRequest -Mailbox Peter -IsArchive -FilePath \\SERVER01\PSTFiles\Archives\Peter\Archive2015.pst

This cmdlet imports PST file into Peter's archive folder. The PST file content will be merged into existing folders, and folders will be created if they don't already exist in the target folder structure.

Using PowerShell to import multiple PST file 

You can also import PST files in bulk using shell command. Place all the PST files in a file shared folder, and now it is possible to execute New-MailboxImportRequest to import all the PST files into the matching mailboxes.

Dir \\SERVER01\PST-Files\*.pst | %{
    New-MailboxImportRequest –Name PstImport –BatchName ImportingMultiplePSTFiles
        –Mailbox $_.BaseName –FilePath $_.FullName

You can also see the complete PST import request by executing this shell command-

Get-MailboxImportRequest | where {$_.status -eq "Completed"}

And, you can also remove it after request is completed because mailbox import request remain on Exchange server until it is removed by administrator.

Get-MailboxImportRequest | where {$_.status -eq "Completed"} | Remove-MailboxImportRequest

That’s it!

So these are the possible solutions which you can follow to import PST file into Exchange mailboxes.

No comments:

Post a Comment