profile for Hannel on Stack Exchange, a network of free, community-driven Q&A sites
Project Work Hours
Sat & Sun 6am - 9am
Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


This post covers Re-balancing (Redistributing) Microsoft Exchange databases in a Database Availability Group (DAG) by Activation Preference using Microsoft Exchange PowerShell.

I have just recently patched my Server and also updated Servers in my Microsoft Exchange 2010 environment to SP3 RU6. To avoid any mail interruptions i had moved databases around and now that i am done i need to re-balance (redistribute) database by database activation preference.


Syntax for running the script:

.\RedistributeActiveDatabases.ps1 -DagName <DAGName> -<How to redistribute>


.\RedistributeActiveDatabases.ps1 -DagName 001-NAEX14-00 -BalanceDbsByActivationPreference
20141102 - Reblance DBs

20141102 – Reblance DBs

Below is a video of the process for visual learners.




Shell History from video

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>history

 Id CommandLine
 -- -----------
 1 . 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto
 2 Get-MailboxDatabaseCopyStatus
 3 Get-MailboxDatabaseCopyStatus -Server 001-EV1MPN1-001
 4 cls
 5 cd "C:\Program Files\Microsoft\Exchange Server\V14\Scripts"
 6 dir *.ps1
 7 cls
 8 Get-MailboxDatabaseCopyStatus
 9 Get-MailboxDatabaseCopyStatus -Server 001-EV1MPN1-001
 10 Get-DatabaseAvailabilityGroup
 11 .\RedistributeActiveDatabases.ps1 -DagName 001-NAEX14-00 -BalanceDbsByActivationPreference
 12 Get-MailboxDatabaseCopyStatus
 13 Get-MailboxDatabaseCopyStatus -Server 001-EV1MPN1-001