List the active databases in an Exchange organization
List the active databases in an Exchange organization

This script will give you a simple way to list the active databases in an Exchange organization

Script :

Get-MailboxDatabase | % { Get-MailboxDatabaseCopyStatus $_.name} | Out-GridView

References

Get-MailboxDatabaseCopyStatus

This cmdlet is available only in on-premises Exchange Server 2013.
Use the Get-MailboxDatabaseCopyStatus cmdlet to view health and status information about one or more mailbox database copies.
For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

Get-MailboxDatabaseCopyStatus -Server  
Get-MailboxDatabaseCopyStatus [-Identity ] [-Local ] 
COMMON PARAMETERS: [-Active ] [-ConnectionStatus ] [-DomainController ] [-ExtendedErrorInfo ] [-UseServerCache ]

Examples

EXAMPLE 1

This example returns status information for all copies of the database DB1. The status results are displayed in a list format.

Get-MailboxDatabaseCopyStatus -Identity DB1 | Format-List

EXAMPLE 2

This example returns the status for all database copies on the Mailbox server MBX1. The status results are also displayed in a list format.

Get-MailboxDatabaseCopyStatus -Server MBX1 | Format-List

EXAMPLE 3

This example returns the status for the copy of database DB1 on the Mailbox server MBX2. The status results are also displayed in a list format.

Get-MailboxDatabaseCopyStatus -Identity DB1\MBX2 | Format-List

Detailed Description

If a database is specified by using the Identity parameter with the command, the status of all copies of the database is returned. If a server is specified by using the Server parameter with the command, information about all database copies on the server is returned. If neither parameter is specified with the command, information about all database copies in the organization is returned.
You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they’re not included in the permissions assigned to you. To see what permissions you need, see the “Database availability groups” entry in the High availability and site resilience permissions topic.

<>
List the active databases in an Exchange organization

Leave a Reply

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