Exchange Server Share

… Information sharing on Exchange Server …

Exchange Powershell Tip #01

Exchange Powershell Tip #01

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

 

==> Get All Exchange Powershell Tips from the Archive Here<==

Written by Amit Tank

May 23, 2014 at 5:04 pm

%d bloggers like this: