Albert Widjaja
asked on
PowerShell script to execute mailbox migration executed by the scheduled task ?
Hi people,
Can anyone here please review my Exchange Server PowerShell below to do the mailbox migration from one Exchange Server called PROD-MBX14 into PRODMBX22-VM and then send the email out for any status complete or error ?
In the .CSV C:\TEMP\Group1_Migration.c sv, there are 688 lines of unique email address per line that is running in the old mailbox server.
What I have done manually is to select all of the mailboxes DB in the new server PRODMBX22-VM called:
PRODMBX22-VM-DB01
PRODMBX22-VM-DB02
PRODMBX22-VM-DB03
PRODMBX22-VM-DB04
But how do I do it using the script above and then executing it with the scheduled task to start the migration in the batch of 10, and then move on to the next one again?
The reason I do it 10 by 10 is that the Exchange server is running out of memory if I do it more than 10.
Thanks in advance.
Can anyone here please review my Exchange Server PowerShell below to do the mailbox migration from one Exchange Server called PROD-MBX14 into PRODMBX22-VM and then send the email out for any status complete or error ?
New-MigrationBatch –Local –Name PROD-Migration CSVData ([System.IO.File]::ReadAllBytes("C:\TEMP\Group1_Migration.csv")) –TargetDatabase SVR1-DB01, SVR1-DB02, SVR1-DB03, SVR1-DB04 -Autostart -AutoComplete
Start-MigrationBatch –Identity PROD-Migration
Complete-MigrationBatch PROD-Migration
In the .CSV C:\TEMP\Group1_Migration.c
What I have done manually is to select all of the mailboxes DB in the new server PRODMBX22-VM called:
PRODMBX22-VM-DB01
PRODMBX22-VM-DB02
PRODMBX22-VM-DB03
PRODMBX22-VM-DB04
But how do I do it using the script above and then executing it with the scheduled task to start the migration in the batch of 10, and then move on to the next one again?
The reason I do it 10 by 10 is that the Exchange server is running out of memory if I do it more than 10.
Thanks in advance.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, what about the target mailbox database ?
How can I specify more than 4 so that the mailbox is distributed automatically ?
How can I specify more than 4 so that the mailbox is distributed automatically ?
ASKER
OK, so how do I specify the email address for the migration report?
Hi , if you have specified the target Db in the CSV ,you can use an excel formula to randomize a target server. (
This this may help )
a=As for the report when you specify the following command at the end you can specify an email address
This this may help )
a=As for the report when you specify the following command at the end you can specify an email address
Complete-MigrationBatch -Identity LocalMove1 -NotificationEmails admin@contoso.com,lucio@contoso.com
ASKER