Export/Import Mailbox Improvements In Exchange 2010 SP1 Beta…
The export/import mailbox process has undergone a major change in 2010 SP1 Beta compared with the RTM version. Major changes are: There is no need to use export-mailbox and import-mailbox cmdlets. The new cmdlets to use are New-MailboxExportRequest and New-MailboxImportRequest. Outlook is no longer required to be installed on the machine from which the cmdlets…
The export/import mailbox process has undergone a major change in 2010 SP1 Beta compared with the RTM version. Major changes are:
- There is no need to use export-mailbox and import-mailbox cmdlets. The new cmdlets to use are New-MailboxExportRequest and New-MailboxImportRequest.
- Outlook is no longer required to be installed on the machine from which the cmdlets are run.
- Exchange Mailbox Replication service handles the export/import process.
Importing and exporting mailbox data has been improved to allow you to import or export pst files in an asynchronous process. In order to see/run export/import cmdlets in the shell, you should be given explicit permissions. No user is allowed to run the command by default. The user who wants to run the cmdlets should be given “Mailbox Import Export” management role.
Let me explain with an example. I want to give my administrator account the necessary rights to run export/import cmdlets. The cmdlet I need to run is
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User “administrator”
You can also create a group and give the group the necessary access. This way, you only need to add any new users who wants this permission to the correct group using AD Users and Computers (thereby avoiding the shell)!
New-ManagementRoleAssignment –Role “Mailbox Import Export” –SecurityGroup “ImportExportGroup”
Let’s get to business, now that the permissions are in place. In order to export a mailbox to a pst file, the command I need to run is
New-MailboxExportRequest –Mailbox “alias” –Filepath “\servernamesharefile.pst”
Run Get-MailboxExportRequest to find the status of the export process and in my case, it has completed successfully.
I do have the PST file in my C drive!
The file path should be a UNC, otherwise you will get the error below.
Similarly, New-MailboxImportRequest brings the PST file back to exchange. You can import a PST file into the primary mailbox or archive.
I have seen various articles which says that the “export-mailbox” cmdlet is no longer available in SP1 Beta. This is not right. The export-mailbox cmdlet is still available and runs successfully as long as Outlook 2010 X64 is installed. I ran it without any errors in an SP1 Beta server.
You receive the error below if you try running the “export-mailbox” without Outlook 2010 X64 installed.
The export/import process has improved significantly and we no longer need Outlook installed when the new cmdlets are used!
Outlook 2010 x64 is not needed in 2010 SP1 beta and RTM. All I was saying that the cmdlet still exists in beta, similar to 2010 RTM.
Outlook 2010 x64 is NOT required on the Exchange server with SP1 RTM.
After doing the New-ManagementRoleAssignment cmdlet you must restart EMS before the New-MailboxExportRequest cmdlet will be available.
So I’d created a PST at the location c:pstfilesuser.pst to test importing PSTs into Exchange 2010 via PowerShell.
I’d already installed 64bit outlook on the server, and added import export roles to the account I was using.
I was then using the command ‘Import-Mailbox –Identity [Username] –PSTFolderPath
c:pstfilesuser.pst’ to import this pst file into [username]’s mailbox.
And hit the following error:
Error was found for XXX because: Error occurred in the step: Approving object. An unknown error has occurred., error code: -2147221219 + CategoryInfo : InvalidOperation: (0:Int32) [Import-Mailbox], RecipientTaskException + FullyQualifiedErrorId : CFFD629B,Microsoft.Exchange.Management.RecipientTasks.ImportMailbox
Can you help?
Thanks Deepak.
Great Blog..Thanks for sharing.