Import-Mailbox: approving object – unknown error has accured.
Those who have already migrated to Exchange 2007 or 2010 are probably familiar with Import-Mailbox cmdlet which has replaced ExMerge utility we used to use for importing and exporting emails on Exchange 2003.
Few prerequisits are needed to make it work properly:
1. 32bit system with Windows XP or later and Outlook 2003 SP1 or higher.
2. Exchange 2007 SP1 Management Tools installed on this machine (download and run 32 bit installer and under Role Selection choose Management Tools).
3. Full Access Permissions to the Mailboxes (preferably for account that is not a domain administrator). However this account should have local administrator rights on the machine with Outlook.
Following command will import a singe .pst file into the mailbox:
Import-Mailbox <MAILBOX ALIAS> -PSTFolderPath <PathToFolderContainingPST>
To import a bunch of PST files to their associated Mailboxes use:
Dir c:PSTFiles*.pst | Import-Mailbox
In case something goes wrong the utility gives the following error message with different error codes, depending on the issue that caused an error:
Error occurred in the step: Approving object. An unknown error has occurred., error code: -<…>
There is not much information on the Internet about the meaning of the codes, so below are few of them:
2147221226: happened when .pst file had an error so that it couldn’t be opened even in Outlook.
2147221223: happened when .pst files were in a shared folder that was mapped as a network drive.
More information about Import-Mailbox usage and parameters: http://technet.microsoft.com/en-us/library/bb691363%28EXCHG.80%29.aspx