export-mailbox to PST file: unknown error in approving object


  • Hi


    I'm trying to validate export/import of PST files with Ex2K7 SP1.

    I have this error during export-mailbox, and didn't find anything about it on the Net:


    [PS] C:\Documents and Settings\Administrator>Export-Mailbox user01 -PSTFol
    derPath C:\temp\

    Are you sure you want to perform this action?
    Exporting mailbox content from the mailbox 'user01' into .pst file
    'C:\temp\user01.pst'. This operation may take a long time to complete.
    Yes Yes  Angel Yes to All  No No  [L] No to All  Sleep Suspend  [?] Help
    (default is "Y"):
    Export-Mailbox : Error was found for user01 (user01@mydomain.com
    ) because: Error occurred in the step: Approving object. An unknown error has o
    ccurred., error code: -2147221241
    At line:1 char:15
    + Export-Mailbox  <<<< user01 -PSTFolderPath C:\temp\

    I'm doing test on one virtual machine hosting AD (win2K3SP2 En), Ex2k7SP1 En, Outlook 2007 Fr.


    Could it come from the Outlook or user mailbox language ?

    The mailbox have been "initiated", I opened it with OWA, select French language, self sent message. I also opened it with Outlook 2007 on the server.



    Saturday, November 17, 2007 11:09 PM

All replies

  • Hello,


    I had the same issue after trying to do the export on server that had exchange 2003 installed.

    I did a fixmapi command and the error disappeared.

    It seems that the power shell takes the bad mapi dll to do the export.



    Elric Osmont



    • Proposed as answer by dlindsey Thursday, January 8, 2009 10:09 PM
    Thursday, December 6, 2007 9:43 AM
  • Hello,


    Thank you for your input. I just tested again on a new virtual lab, with Exchange 2007 SP1 release, and Outlook 2003 SP2, seems to work now. I will take back the previous config to see if the pb was coming from Outlook 2007, with your solution, but the lab never had Exchange 2003 installed on it.



    Saturday, December 8, 2007 9:26 PM
  • Dear Elric,


    I have the same issue, can plz tell me how u use fixmapi command to fix this error.



    Monday, December 17, 2007 8:34 AM
  • Yes - That information would be nice to know.

    Dallas Computer Support
    Tuesday, December 18, 2007 5:29 PM
  • Hello,

    I just ran fixmapi without parameters at command line.

    There is no outputs and it works immediately.



    Elric Osmont


    Wednesday, December 19, 2007 9:09 AM
  • This just worked for me too - but can anyone explain what the command does?  Thanks.
    Wednesday, January 2, 2008 12:50 AM
  • Hello,


           Details u needed.


    The Fixmapi.exe tool is included with Internet Explorer 5 & above to detect and aid in resolving conflicts with Messaging Application Programming Interface (MAPI) files that may affect your ability to send and receive mail and faxes from other programs.



    FixMAPI ( What Exactly it does ?).....

    Makes a backup copy of the current copy of mapi32.dll on the client computer, and restores mapi32.dll with the MAPI stub library, mapistub.dll.

    Quick Info

    Exported by: mapistub.dll
    Called by: Client
    Implemented by: Windows

    Return Values

    If the function succeeds, the return value is a non-zero value.

    If the function fails, the return value is zero. To get extended error information, call the Microsoft Platform Software Development Kit (SDK) function, GetLastError.


    FixMAPI does not replace the current mapi32.dll file if the file is marked as read-only.

    FixMAPI does not replace the current mapi32.dll if Microsoft Exchange Server is installed on the computer.

    When FixMAPI makes a backup copy of the current copy of mapi32.dll on the computer, it assigns the backup copy a name different from "mapi32.dll". It then directs subsequent calls intended for that assembly to the backup copy


    URL - > for u r more info. http://support.microsoft.com/kb/228457



    Saturday, January 5, 2008 11:26 AM
  • I am using an XP Machine with the Exchange Tools installed and I'm getting the "Error occurred in the step: Approving object. An unknown error has occurred", I ran "fixmapi" at a command line and hit enter and it goes to the next line. I then try "import-mailbox -identity <alias> -PSTFolderPath "c:\pstfilename.pst"" and get the same error.


    Can you tell me what I'm doing wrong?



    Friday, March 28, 2008 3:03 PM
  • Hello,

    I experiment the same problem when I tried to export a user to PST.

    I just resolved the problem.

    I have this error even if the user is located on Exchange 2000 or Exchange 2007

    To resolve the problem on the Exchange 2000.Go on the properties of each Exchange 2000 database,  add a user or a group with the right : receive as and send as.

    In Exchange 2007, for each mailbox database, tape this command:

    Add-AdPermission -identity 'database_name' -AccessRights GenericAll -user 'Myuser'

    Finally I can export a user  to PST even if he is hosted  in Exchange 2000 or in Exchange 20007

    Monday, April 7, 2008 3:31 PM
  • Hello

    I was only able to export a User Mailbox after giving myself "fullAccess"
    permissionsin the user mailbox:

    Add-MailboxPermission -identity "user_to_export" -Accessrights FULLACCESS -User "admin_user"

    After this I ran:

    Get-mailbox "user_to_export" | Export-Mailbox -PSTFolderPath d:\mailboxpst

    I already add Inherited permissions in this mailbox as a Exchange administrator but only after this I manage to succesfuly export a mailbox to a .pst file.
    Tuesday, April 15, 2008 10:56 AM
  • Oh my god.  I spent a better part of the day trying to fix this error.  Elric thank you.  I cannot believe it was that simple.  What the hell would be so messed up to cause that?

    open powershell.  type fixmapi <enter>
    run your export.

    WOW, CMON microsoft thats some bs

    Thursday, January 8, 2009 10:11 PM
  • For what its worth, on my end this problem seemed to correlate to having Outlook open during the export. Must load a different MAPI DLL when it opens because as soon as I closed it, it started miraculously working again!
    Thursday, September 3, 2009 7:31 PM
  • Thank you! I was running it on my workstation and having Outlook open was the problem.
    Thursday, November 18, 2010 6:53 PM
  • This was the order of operations that worked for me:

    Close Outlook

    Run fixmapi at the PowerShell command prompt

    Run Export-Mailbox command


    • Proposed as answer by Jimmy Colorado Wednesday, May 11, 2011 7:36 PM
    Thursday, April 21, 2011 1:36 PM
  • Guys, i know this my input is quite late but i experienced the same error while trying to restore a users PST in a recovery environment.I tried the FIXMAPI command, FULL ACCESS permissions on the mailbox all to no avail. I then tried to launch outlook to create a user profile and it gave me a hint by displaying the error "Your computer does not have a default gateway configured"

    Believe it or not, after configuration of the gateway, the Export-Mailbox command worked like a charm :-)

    It appears that lack of a default gateway can cause the error


    • Proposed as answer by Nateramma Monday, October 8, 2012 11:33 PM
    Thursday, May 12, 2011 6:27 AM
  • Thanks Alngethee a lot. Your post did a magic. I spent around 1 hour to find the solution of the said error, tried every possibility but no vain. Actually I was using a test machine without any Gateway. Once configure the gateway with IP of DC, Export Command executed successfully.

    Thanks again.

    Sunday, July 31, 2011 9:14 PM
  • Just confirming the fixmapi solution worked perfectly for me.  Thanks!
    Saturday, December 10, 2011 4:42 AM
  • I got this error when trying to export to an admin network share ie \\exchserver\c$

    Changed to C:\ and it worked.

    Friday, February 10, 2012 4:15 PM
  • Hello Moderator's please close this thread.

    Gulab Prasad,
    MCITP: Exchange Server 2010 | MCITP: Exchange Server 2007
    MCITP: Lync Server 2010 | MCITP: Windows Server 2008
    My Blog | Z-Hire Employee Provisioning App
    Skype: Exchange.Ranger

    Saturday, February 11, 2012 6:44 AM
  • Thank you!  this was the magic bullet for me
    Monday, June 25, 2012 3:54 AM
  • Alngethee,

    Thankyou Thankyou Thankyou!  Hours of frustration ended because of your post.  Again, thankyou.

    • Edited by Nateramma Monday, October 8, 2012 11:35 PM
    Monday, October 8, 2012 11:35 PM
  • Hello

    I now get the same error but do not get an error code. We have exchange 2007 sp3

    I have full right on the mailbox, mail database. I have run the fixmapi but still get the same error.

    I was running Windows 7 and office 2010 everything was working. last week I upgraded to Windows 8 and office 2013.

    Guess this is the problem but is there a fix


    Wednesday, November 7, 2012 12:59 PM
  • Sinds last week after microsoft update of 13-11-2012 on SBS 2008 and my Win7 32 bit client the Export-Mailbox -Identity test -PSTFolderPath "C:\Users\test\Documents\test.pst" -Confirm:$false script stoped working with the error. Is there a fix?

    [21-11-12 17:11:57] [0] Executing Command: 'Export-Mailbox -Identity paul -PSTFolderPath "C:\Users\testDocuments\test.pst" -Confirm:$false'
    [21-11-12 17:11:58] [0] Trying to open registry key 'Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\OUTLOOK.EXE'.
    [21-11-12 17:11:58] [0] The default value of the registry key is 'C:\PROGRA~1\MICROS~1\Office14\OUTLOOK.EXE'.
    [21-11-12 17:11:58] [0] The version of Outlook.exe is '14.0.6126.5003'.
    [21-11-12 17:11:58] [0] Searching objects "test" of type "ADUser" under the root "$null".
    [21-11-12 17:11:58] [0] Previous operation run on global catalog server 'SERVER.domain.local'.
    [21-11-12 17:11:58] [0] Processing object "domain.local/MyBusiness/Users/SBSUsers/Test".
    [21-11-12 17:11:58] [0] Searching objects "servver" of type "Server" under the root "$null".
    [21-11-12 17:11:59] [0] Previous operation run on domain controller 'SERVER.domain.local'.
    [21-11-12 17:11:59] [0] Searching objects "SERVER\First Storage Group\Mailbox Database" of type "MailboxDatabase" under the root "$null".
    [21-11-12 17:11:59] [0] Previous operation run on domain controller 'SERVER.domain.local'.
    [21-11-12 17:11:59] [0] Ending processing.
    [21-11-12 17:11:59] [0] [test] The operation has started.
    [21-11-12 17:11:59] [0] [test] Initializing MAPI, loading library.
    [21-11-12 17:11:59] [0] [test] Approving object.
    [21-11-12 17:11:59] [0] [test] Logging on to the MAPI profile.
    [21-11-12 17:11:59] [0] [test] Opening Exchange mailbox.
    [21-11-12 17:11:59] [0] [ERROR] Error was found for Test (test@maindomain.nl) because: Error occurred in the step: Approving object. An unknown error has occurred., error code: -2147221233
    [21-11-12 17:11:59] [0] [test] The operation has finished.

    • Edited by jojodotnet Friday, November 23, 2012 11:34 AM
    Sunday, November 18, 2012 1:26 PM
  • Downgrade outlook 2010 to a previous hotfix/SP:

    14.0.6123.5000 (kb2598374)  = and above break Export-Mailbox with "error code: -2147221233"

    14.0.6117.5001 (kb2553248) = works

    14.0.6120.5000 (kb2598318)  = works

    see this thread: http://social.technet.microsoft.com/Forums/en-US/exchangesvradminlegacy/thread/1a979543-c4f8-4504-8870-95612c81b181

    Tuesday, November 27, 2012 9:47 AM
  • That worked!  Thank you.
    Wednesday, December 12, 2012 8:44 PM
  • Thank you so much!   I'd tried all the other suggestions to get the mailbox export to work again and it turned out SP1 was the problem.  I suspected it was an update but there were too many since the last time the export worked for me, and your post pinpointed the update I needed to remove.

    Tuesday, January 8, 2013 4:17 PM

    this was my problem too, lost about 2 days looking into this issue.

    Had the error on Win 7 Pro w/ Office 2013, Windows 8 w/ Office 2010 & XP Pro w/ Office 2010.

    I removed (kb2687623) from XP Pro w/ Office 2010

    and it worked.

    thanks to everyone here - my appreciation

    Monday, January 28, 2013 5:38 PM
  • NKV,

    thanks for posting this question -

    if you have Office 2010 - see the bottom of this thread for help there - is a security patch that needs to be removed (as of 2013-01-28)

    Monday, January 28, 2013 5:42 PM
  • The same is happening for Office 2013, just haven't been able to figure out which update is causing it.
    Monday, February 25, 2013 4:03 PM
  • To anyone who is having this issue, but the fiximpi and the other permission based resolutions aren’t the answers. I was recently having this error, and an issue with user not being able to login to owa that we just weren’t able to resolve, so we opened a support ticket with Microsoft. I wasn’t personally responsible for this error someone else in the department was, so this is what I was told resolved both issues, if this doesn’t make complete sense that is why. We had installed service pack three for exchange 2007, a while back, and either the install was corrupted or it became corrupted, either way this was the culprit. The tech had us “extract” service pack three and run setup.com –pda, or something like that, through command prompt. This reapplied some permissions that were causing our issues. Again, I was told about this resolution and I realize it doesn’t explain much; hopefully someone more fluent in exchange understands what I am saying and can help clarify. I was also told that this isn’t a bug or issue with service pack three this just happened to be the latest large update to exchange that we did, and that other large updates or roll up packages can cause this and similar issues. My two cents on this issue is that it occurred because the install of SP 3 may have failed the first time, at which point it rolled back to the restore point it made before the install. I personally have had issues with restore points not reapplying system permissions that aren’t necessarily specific to a user or a group, but still cause me headaches.

    • Proposed as answer by Sajad Ahmad Sunday, November 3, 2013 1:08 PM
    • Unproposed as answer by Sajad Ahmad Sunday, November 3, 2013 1:08 PM
    Friday, August 9, 2013 7:59 PM
  • I was having the same problem, all did all what people suggested here. but same problem remains

    now, i unistalled office 2013 and installed 2007 and it worked fine.

    Sunday, November 3, 2013 1:11 PM
  • I've been having this problem all day today and finally was able get it working. In my case, the version of the Exchange Management Tools I was using to run the import or export command was on a different service pack than what was on my exchange server. Updating the tools on the workstation I was using and re-running the commands did the trick. 

    Wednesday, July 23, 2014 4:14 AM
  • Hi Guys,

    If your running Outlook 2010 32bit with Exchange 2007 Management Tools installed, the Import-Mailbox command will fail if you install the latest Microsoft Office updates.  There are a few updates you need to uninstall in order for the Import-Mailbox command to work correctly.

    I have documented this here:


    Kind Regards,

    Clint Boessen MVP - Exchange Server, MCSE, MCITPx6, Dip Network Engineering
    Perth, Western Australia

    Blog: http://clintboessen.blogspot.com
    Employer: http://www.avantgardetechnologies.com.au

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Proposed as answer by Clint Boessen Monday, September 15, 2014 10:32 AM
    Monday, September 15, 2014 10:32 AM