Exchange 2010 DAG Related

Get DAG Status

Get-DatabaseAvailabilityGroup {DAG NAME} -Status | fl

StartDagServerMaintenance.ps1 script to put the DAG member in maintenance mode

 .\StartDagServerMaintenance.ps1 -serverName {DAG NAME}

StopDagServerMaintenance.ps1 script to take the DAG member out of maintenance mode

.\StopDagServerMaintenance.ps1 -serverName {DAG NAME}

Find DatabaseCopyAutoActivationPolicy for all Servers

Get-MailboxServer | Sort-Object -Property  DatabaseCopyAutoActivationPolicy | ft name,DatabaseCopyAutoActivationPolicy -AutoSize

Get Maintenance Status

Get-DatabaseAvailabilityGroup {DAG NAME} -Status | fl Servers, ServersInMaintenance

Get ALL Databases and Active Preference information NEAT

Get-MailboxDatabase | Sort Name | ft Name,ActivationPreference -AutoSize

Get total number of Databases in Organzation

(Get-MailboxDatabase | Sort-Object -Property  Servername Name | ft Name,ServerName,MountedOnServer, ActivationPreference).count

Get All databases and Activation Preference information

Get-MailboxDatabase | ft name, server, activationpreference -AutoSize

Get Specific databases and Activation Preference information

Get-MailboxDatabase -Identity {DB Name} | fl name, server, activationpreference

Get Primary Active Manager (PAM)

Get-DatabaseAvailabilityGroup -Identity {DAG NAME} -Status | fl name,primaryactivemanager

Move PAM to another server

cluster.exe {DAGname.Domain.com) group “cluster group” /moveto:{servername}

To block DB activation (switch site as needed)

Get-ExchangeServer | where { $_.Site -like ‘{ExchangeOrg.Domain.com/Configuration/Sites/SiteA’ } | Get-MailboxServer | Set-MailboxServer –DatabaseCopyAutoActivationPolicy Blocked

Enable DAC Mode

Set-DatabaseAvailabilityGroup –identity “{DAG NAME}” –DatacenterActivationMode DagOnly

Run RedistributeActiveDatabases.ps1 script to re-balance the active database copies across the DAG

.\RedistributeActiveDatabases.ps1 -DagName {DAG NAME} -BalanceDbsByActivationPreference -ShowFinalDatabaseDistribution -Confirm:$false > DagConfig.txt

Get Primary Active Manager

get-databaseavailabilitygroup –identity {DAG NAME} –status | fl name,primaryActiveManager

Remove Server from Dag

Remove-DatabaseAvailabilityGroupServer -Identity {DAG NAME} -MailboxServer EXCHM01

Add Server to DAG

ADD-DatabaseAvailabilityGroupServer -Identity {DAG NAME} -MailboxServer EXCHM04

Unblock all databases hosted on a server

Set-MailboxServer –identity {ServerName} –DatabaseCopyAutoActivationPolicy Unrestricted

Block all databases hosted on Server

Set-MailboxServer –identity {ServerName} –DatabaseCopyAutoActivationPolicy Blocked

Set Mailbox Database Copy Activation Copy

Set-MailboxDatabaseCopy -Identity {DB Name}\{ServerName} -ActivationPreference 1

To block a database copy from getting activated automatically

Suspend-MailboxDatabaseCopy –identity {DB Name}\{ServerName} –ActivationOnly



Categories: Exchange 2010, Exchange Server

Tags: , , , , , , , , ,

We look forward to hearing your feedback..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: