2

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...

grojo
  • 429
  • 1
  • 7
  • 18

1 Answers1

2

This could be a permissions issue, make sure the account you are exporting with has rights to send as and recieve as on that account.

That said, if it's exporting some mail then it's unlikely that it is that. One thing you can try is to create a new mailbox database and move this mailbox there, then try an export.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114
  • 1
    looks like permissions is not the issue. However, moving the messages to another mailbox or even a different folder is working. See update – grojo Mar 12 '10 at 11:42