RedistrubuteActiveDatabases.ps1

You can use the RedistributeActiveDatabases.ps1 script to balance the active mailbox databases copies across a DAG. This script moves databases between their copies in an attempt to have an equal number of mounted databases on each server in DAG. If required, the script also attempts to balance active databases across sites.

The script provides two options for balancing active database copies within a DAG:

    BalanceDbsByActivationPreference   When this option is specified, the script attempts to move databases to their most preferred copy (based on Activation Preference) without regard to Active Directory site.
    BalanceDbsBySiteAndActivationPreference   When this option is specified, the script attempts to move active databases to their most preferred copy, while also trying to balance active databases within each Active Directory site.
      All parameters from Technet;

    DagName

    Specifies the name of the DAG you want to rebalance. If this parameter is omitted, the DAG of which the local server is a member is used.

    BalanceDbsByActivationPreference

    Specifies that the script should move databases to their most preferred copy without regard to Active Directory site.

    BalanceDbsBySiteAndActivationPreference

    Specifies that the script should attempt to move active databases to their most preferred copy, while also trying to balance active databases within each Active Directory site.

    ShowFinalDatabaseDistribution

    Specifies that a report of current database distribution be displayed after redistribution is complete.

    AllowedDeviationFromMeanPercentage

    Specifies the allowed variation of active databases across sites, expressed as a percentage. The default is 20%. For example, if there were 99 databases distributed between three sites, the ideal distribution would be 33 databases in each site. If the allowed deviation is 20%, the script attempts to balance the databases so that each site has no more than 10% more or less than this number. 10% of 33 is 3.3, which is rounded up to 4. Therefore, the script attempts to have between 29 and 37 databases in each site.

    ShowDatabaseCurrentActives

    Specifies that the script produce a report for each database detailing how the database was moved and whether it is now active on its most-preferred copy.

    ShowDatabaseDistributionByServer

    Specifies that the script produce a report for each server showing its database distribution.

    RunOnlyOnPAM

    Specifies that the script run only on the DAG member that currently has the PAM role. The script verifies it is being run from the PAM. If it is not being run from the PAM, the script exits.

    LogEvents

    Specifies that the script logs an event (MsExchangeRepl event 4115) containing a summary of the actions.

    IncludeNonReplicatedDatabases

    Specifies that the script should include non-replicated databases (databases without copies) when determining how to redistribute the active databases. Although non-replicated databases can’t be moved, they may affect the distribution of the replicated databases.

    Confirm

    The Confirm switch can be used to suppress the confirmation prompt that appears by default when this script is run. To suppress the confirmation prompt, use the syntax -Confirm:$False. You must include a colon ( : ) in the syntax.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    − 1 = 2