Script to move mailboxes from Exchange 2003 to 2010
Hello, I have tihis powershell script to move users from my old Ex2003 to my new Ex2010 here is the code: $Userstodatabase = import-csv C:\MailboxMove\MM.csv foreach ($Record in $Userstodatabase) { $users = $record.user $database = $record.database New-MoveRequest –identity $users –TargetDatabase “$Database” } The parameter are entered in the file MM.cvs. Woks fine, but when I have a corrupted item on the mailbox, the script don't move the mailbox. My question is, how I can add the option "skip the corrupted messages" to my sript? I'm new in the scripting world!. Any help would be appreciated, links to forums, etc.
July 1st, 2011 8:06pm

Find the answer!!!! hope this will help someone else. To move a mailbox to a destination in the same forest, run the following command: Copy Code Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" Note: If the value of any parameter, such as the database name, contains a space, you must enclose it in quotation marks. If you want to specify the number of corrupted messages that can be skipped before the move will fail, use the BadItemLimit parameter, as in the following command: Copy Code Move-Mailbox contoso\john -TargetDatabase "First Storage Group\Mailbox Database" -BadItemLimit 5
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2011 10:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics