Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in progress to migrate (approximately) 5000 mail-objects and I need a way /script /command that will allow me to utilize the New-MoveRequest CMD-Let in combination with the possibility to dynamically assign the TargetDatabase.

Any thoughts would be great.

Cheers, Andor

share|improve this question
add comment

2 Answers 2

Automatic mailbox distribution is your friend, from Tech-net, the TargetDatabase parameter is optional, and they say The TargetDatabase parameter specifies the identity of the database that you're moving the mailbox to. If you don't specify the TargetDatabase parameter, the command uses the automatic mailbox distribution logic to determine the database to move to.

You'll need to exclude any databases you don't want as targets, and Exchange will automagically balance them for you. Stuff on Automatic mailbox distribution at Tech-net.

share|improve this answer
    
Thanks again for reminding me of the 'good stuff'! –  Andor Oct 3 '12 at 12:29
    
I am still very eager to understand if there is a possibility to script this. The advantage here is that we can control the usage of DB's and so on, whereas the Automatic Mailbox Distribution is 'random' –  Andor Oct 3 '12 at 13:06
1  
I understand where you are coming from, I too prefer to control wheere mailboxes end up! To do this, prepare a CSV file listing out Identity and TargetDatabase, putting each user in the preferred mailbox database. Then the PowerShell to move mailboxes to the corresponding mailbox database would be Import-Csv C:\Script\mailboxes.csv | ForEach-Object -Process {New-MoveRequest -Identity $_.Identity -TargetDatabase $_.TargetDatabase} –  downthepub Oct 4 '12 at 6:57
    
I feel that I am almost there, but preparing 5000+ objects is a somewhat tedious job and wonder if there is a possibility to 'automate' the final step. In other words, what if I would like the possibility to automate the -Targetdatabase from a selection of 5 databases? –  Andor Oct 6 '12 at 10:50
    
This post is incorrect as Exchange 2010 randomly chooses a database. It does not have any logic to it that considers database load or disk space available when choosing a database. Your link is to the 2013 version, not 2010 as indicated in the OP. technet.microsoft.com/en-us/library/ff872148(EXCHG.141).aspx –  Colyn1337 Apr 9 at 14:30
add comment

The automatic distribution option in Exchange 2010 is performed by random selection. However, you do have some options to control which DB's are randomly selected. The following technet article will help you:

http://technet.microsoft.com/en-us/library/ff872148(EXCHG.141).aspx

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.