One of the limitations of Exchange 2010 RTM was that there was no administrative way to move historical (PST) data into the online archive. One of the method was to manually drag and drop messages from PST into online archive, but was it practical for enterprise or even medium sized businesses.
With Exchange 2010 SP1 beta things have changed and now we have the functionality out of box to import historical mailbox data from .pst files directly to the user’s personal archive or primary mailbox using the New-MailboxImportRequest cmdlet. This would help the administrators to be able to perform bulk import and export of PST files without using Outlook client.
To be able to import PST file or export to PST files, the administrator must have the appropriate permissions within Exchange. As of today, no RBAC Role Group provides permissions for this functionality. So what do we do….
- We first need to create a new role group that grants access to the *-MailboxImportRequest and *-MailboxExportRequest cmdlets.
New-RoleGroup “Mailbox Import-Export Management” -Roles “Mailbox Import Export”
- Now we need to add the Exchange Administrators who will be allowed to perform these activities to the role group:Add-RoleGroupMember “Mailbox Import-Export Management” -Member <user account>
So, now we are all set, we will my Mailbox “Nitin Gupta” that has 6 mails in the Personal Archive Mailbox….
So here is my PST File that I will be importing into my Personal Archive
So now we will use the New-MailboxImportRequest cmdlet to import the PST into my Personal Archive. To import into an Archvie we need to use the switch -IsArchive
New-MailboxImportRequest -Mailbox “Nitin Gupta” -FilePath \\W2K8R2-DC-MSX\C$\PSTs\NitinGupta_Old.pst -IsArchive
To see if the Import has completed use the command Get-MailboxImportRequest
Once the Import is completed, you would see the mails in the Personal Archive! There we 6 mails in Archive already and now after coping 15 mails from PST the total is 21 !
Please note that I did not use any Target Folder so it copied all mails to Root, and since my mails were in folder call Inbox it copied them to Inbox of Personal Archive.
In case you want to copy all Old mails from PST maybe in a Folder called “Old Mails” under the root then you need to specify –TargetRootFolder. The TargetRootFolder parameter specifies the top-level mailbox folder that the imported content is placed in. If you don’t specify this parameter, the command imports folders to the top of the folder structure in the target mailbox or archive. If the folder already exists, content is merged under existing folders, and new folders are created if they don’t already exist in the target folder structure.
I would use same PST again to copy mails in Target Root Folder “Old Mails”, we would use
New-MailboxImportRequest -Mailbox “Nitin Gupta” -FilePath \\W2K8R2-DC-MSX\C$\PSTs\NitinGupta_Old.pst –IsArchive –TargetRootFolder “Old Mails”
So what it has done is created a root Folder called Old Mails in my inbox and copied all the 15 mails from PST to that, under a folder called Inbox
- The Exchange Trusted Subsystem Security Group should be provided Full Control/Owner permissions on file share where PSTs files are going to be stored.
- You have to use the UNC path only, if you do not, then you will encounter the following error
FilePath ‘C:\folder\filename.pst’ is not a valid UNC path.
+ CategoryInfo : InvalidArgument: (c:\psts\NitinGupta_Old.pst:LongPath) [New-MailboxImportRequest], NonUNCFilePathPermanentException
+ FullyQualifiedErrorId : 5DBAAACE,Microsoft.Exchange.Management.RecipientTasks.NewMailboxImportRequest
- If the Microsoft Exchange Mailbox Replication service is not running then you will encounter the following error
There are no available servers running the Microsoft Exchange Mailbox Replication service.
+ CategoryInfo : NotSpecified: (0:Int32) [New-MailboxImportRequest], NoMRSAvailableTransientException
+ FullyQualifiedErrorId : 2D6A95BC,Microsoft.Exchange.Management.RecipientTasks.NewMailboxImportRequest
So a wonderful feature that will make lives of Administrators easy !!