Monday, June 9, 2014

Get the list of DAG databases that are not mounted on the preferred database copy in the DAG.

How to get the list of DAG databases that are not mounted on the preferred database copy in the DAG.

Get-MailboxDatabase | sort name | Where-Object { $_.Server.Name -ne $_.ActivationPreference[0].Key.Name} | FT @{Name=”Database”;expression={$_.name}}, @{Name=”Mounted On”;expression={$_.Server}}, @{Name=”Should Be Mounted On”;expression={$_.ActivationPreference[0].Key.Name}}


Result:
Database                Mounted On                Should Be Mounted On
——–                      ———-                      ——————–
Database-01           Server02                     Server01
Database-03           Server02                     Server01
Database-05           Server02                     Server01
Database-07           Server02                     Server01
Database-09           Server02                     Server01
Database-11           Server02                     Server01

No comments:

Post a Comment