Exchange Server 2010 SP1 comes with an Exchange PowerShell Script that can rebalance the databases hosted on the DAG.
This script can save you some time when recovering from a failed server or service, Just remember that the script is using the Database Activation Preference.
Using the script is very simple, all you have to do is start the Exchange Shell and navigate to the Exchange scripts folder.
[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>
And run the .\RedistributeActiveDatabases.ps1 script
The full cmdlet will look like this:
[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\RedistributeActiveDatabases.ps1 -DagName dag –BalanceDbsByActivationPreference
If you get the following error:
Database ‘Mailbox Database 0601904′ CANNOT be moved to server ‘EXC1′ because it failed validation checks! Error: Target server ‘EXC1′ has an activation policy of ‘Blocked’.
You need to allow the mailbox server to use Automatic Activation Policy.
To allow this run the following Exchange cmdlet against the mailbox servers:
Set-MailboxServer -Identity exc1 –DatabaseCopyAutoActivation Policy Unrestricted