How to Use Get-MailboxDatabaseCopyStatus Cmdlet? Get the Solution

  author
Written By Kumar Raj
Anuraag Singh
Approved By Anuraag Singh
Published On June 10th, 2021
Reading Time 6 Minutes Reading

Summary: In this write-up, we will provide solution and guide users to use the Exchange PowerShell Get-MailboxDatabaseCopyStatus Cmdlet to view the health & status information about one or more mailbox database copies. In addition to this, we have also provided the method which helps users to recover their minimal and major corrupted offline / dismounted Exchange database file in a simplified manner. Users can use this solution when anything occurs wrong with the EDB file.

Microsoft Exchange Server is extensively used by numerous IT organizations and other industry verticals around the world for business and communication purposes. It is working at such scale-like – small, medium, and large, it is necessary for users to do its maintenance from time to time.

Here, we aren’t discussing the entire maintenance process but especially on one option were having the DAG (Database Availability Group). Users have to make sure that the database are synchronized between the active as well as passive copy. In case, if anything wrong occurs with the main site, then there will be no loss of data or when any catastrophic or disaster occurs, or where users have allocated the maintenance window to maintain the hardware, install the updates or upgrade hardware.

Overview Of Get-MailboxDatabaseCopyStatus Command

The Exchange PowerShell cmdlet provided here allows users to provide the status information & view health about the one mailbox database copy or more than it. It is only available on the on-premise Exchange and applies to the Exchange 2010, 2013, 2016, 2019 Server versions.

When the database is specified by using the identity parameter with the cmdlet, then the status of all database copies is returned. If the users server is specified via server parameter command then information of all database copies on the server is returned. When any parameter is specified within the cmdlet, then the information about all the copies of the database in the organization is returned.

Note: There are time where because of certain issue like corruption users won’t be able to access the Exchange database file and mailboxes & unable to perform any operation. To recover as well as repair Exchange mailbox and database from corruption there are any users who want to avoid the complexity and technicality of manual solution and want the hassle free solution.

In that case, users can use the SysTools Exchange Server Recovery Tool which support offline/dismounted Exchange database file and provides Quick and Advance scan mode option to recover and repair EDB file from minimal and major corruption. After recovery, users can easily extract mailbox from EDB file Exchange 2016 and below version and export directly to the Live Exchange Server 2016, 2013, 2010, 2007, 2003 mailboxes, Office 365 and multiple file format.

Download purchase

How to Use Get-MailboxDatabaseCopyStatus Cmdlet?

There are certain examples provided here which help you to know how to use this cmdlet and perform various operation.

Before using the command users have to assign some permission and if you don’t know what role assignment are required. In that case, you can use the cmdlet given below:

Get-ManagementRole -Cmdlet Get-MailboxDatabaseCopyStatus

After executing the above command it provides the role that users need to run the PowerShell cmdlet.

If any user needs full permission depend on the parameter then they have to specify the switch and separate each switch with comma:

Example:

Get-ManagementRole -Cmdlet Get-MailboxDatabaseCopyStatus -CmdLetParamaters extendederrorinfo, identity, useServerCache

When users get the correct information then they need to get the permission active for them to run the command. To do this, open EAC >> click on permission >> then, select the admin roles.

It is advised that you can create the new role which is called GetMailboxCopyStatus & set the permission as well as assign the users.

When this is ready users can execute the command.

1. Execute the following cmdlet to return the status of the information of all database copies i.e. DB01 and the status results are displayed in the list format.

Get-MailboxDatabaseCopyStatus -Identity DB01 | Format-List

2. Use the command given below to return the status of all the copies of the Mailbox Server i.e. MBSRVR01. Along with this the status results are also displayed in the list format.

Get-MailboxDatabaseCopyStatus -Server MBSRVR01 | Format-List

3. Insert the following PowerShell cmdlet mentioned below to return the status of database copy DB01 on the mailbox server MBSRVR01. In addition to this, the status result are also displayed in the list format.

Get-MailboxDatabaseCopyStatus -Identity DB01\ MBSRVR01 | Format-List

Like this, there are various parameters available that users can use in the cmdlet and perform different operations.

Let’s Understand the Parameter Of Get-MailboxDatabaseCopyStatus Cmdlet

1. -Active

This switch specifies whether to return the mailbox DB copy status for the active mailbox database copy only.

2. -ConnectionStatus

The ConnectionStatus parameter is no longer used & has been deprecated.

3. -DomainController

In this switch, users have to specify the domain controller that they will be using to read as well as write the data from the AD (Active Directory). Also, you have to specify the FQDN on the server.

4. -UseServerCache

This parameter is used to specify whether to enable the server-side remote procedure call (RPC) for the caching of status information for 5 seconds.

5. -ExtendedErrorInfo

The following switch specify whether to return the output object containing any exception details.

6. -Identity

It is used to specify the database copy name to gather information. This parameter is specified in the form of  <Database>\<Server>.

7. -Local

This local parameter specify whether to return the status information of the mailbox database copy from only the local mailbox server.

8. -Server

This parameter specify the return status information of Mailbox Server for all of its mailbox database copies. You cannot combined the -Server parameter with the -Identity parameter.

Bringing It All Together

In this article, we have provided detailed information which allows users to know how to use Get-MailboxDatabaseCopyStatus cmdlet to view the health and status information of one or more Exchange mailbox database copies. In case, if any EDB file gets corruption then users can use the advanced solution described which allow users to recover and repair Exchange database from minimal and major corruption and export recovered mailboxes to Live Exchange Server and various other option in a simplified manner without any hindrance.

  author

By Kumar Raj

A versatile writer with the vast knowledge of technology helps to reduce the gap between a user and technology. Provides easy and reliable ways to resolve multiple technical issues, which users encounter in their day-to-day life.