We are running Exchange 2010 SP3. Per region we have two AD sites/ Data centers running one DAG Active/Active configuration. Taking Germany
as an example:
Berlin has it's own CAS array, mailbox servers and normally 50% of DB's are active on Berlin mailbox servers
Frankfurt has its own CAS array, mailbox servers, and normally 50% of DB's are active on Frankfurt mailbox servers.
In the event of a Data center issue, we can activate all the DB's on servers in either DC.
(We are set to Active/Active because we have users in both offices).
Each DB has four copies, two in one data center, two in another. For any database, Preference 1 and Preference 2 servers are in the same
DC, and Preference 3 and Preference 4 in the other.
Now, management have asked me to compile a report:
1. For any given mailbox servers, list the databases and their Primary site (i.e. Preference1 / Preference2 location) and their Secondary
site (i.e Preference 3/Preference 4 location)
2. For any given list of users, list their Primary site and Secondary site
Any ideas how I can automate this task using Powershell?
Manually:
For #1, we can do Get-mailboxdatabase -server BERLIN1. This will return the databases. Then on each database, we run Get-mailboxdatabase
-identity DAG01DB001 | select *pref*, and this lists the mailbox servers and their Preference. But how do we say, "If Preference 1 is Berlin" then list Berlin, and "If Preference 2 is Munich" then list Munich?
For #1, we can do Get-mailboxdatabase -server BERLIN1. This will return the databases. Then on each database, we run Get-mailboxdatabase
-identity DAG01DB001 | select *pref*, and this lists the mailbox servers and their Preference. But how do we say, "If Preference 1 is Berlin" then list Berlin, and "If Preference 2 is Munich" then list Munich?
Hi,
Not sure if I understand exactly what you're after, but maybe you can build something with presentalble logic if you run:
Get-MailboxDatabase -Status | ft MountedOnServer,Name,ActivationPreference
Martina Miskovic
Marked as answer byEvan LiuModeratorTuesday, November 27, 2012 9:49 AM