Export-Mailbox - fails with large folders

Posted by grojo on Server Fault See other posts from Server Fault or by grojo
Published on 2010-03-11T15:24:59Z Indexed on 2010/03/17 10:51 UTC
Read the original article Hit count: 241

I am trying to move messages from a rather large mailbox to an archive mailbox. However I run into errors all the time.

the command I am executing is

Export-Mailbox -Identity MAILBOX_FROM -TargetMailbox  ARCHIVE -TargetFolder ARCHIVE_FOLDER  -StartDate 2009-02-01 -EndDate 2009-02-28 -DeleteContent -Confirm:$false

I can copy/move some messages, but run into frequent "an unknown error has occurred" (statuscode -1056749164)

I run the console as administrative user, and all permissions are set right, as far as I can tell. I've restricted the start and end dates in case the number of messages moved/deleted should create problems.

Anything I am missing in my setup? Corrupted messages? Over-limit message sizes?

Update:

What I've learnt so far, is that folder with more than approx 3000 messages will generate errors. If mail retention is set (default 30 days), Export-Mailbox will scan all messages whether these were deleted in previous runs or not, and date restriction to limit number of messages will not work.

To avoid errors, I've switched off deleted message retention for the mailbox, and moved the messages from one large folder to multiple folders, and moved these one by one...

© Server Fault or respective owner

Related posts about exchange-2007

Related posts about exchange