MailboxDatabase is one of the several Exchange Server PowerShell cmdlets which retrieve the mailbox database information and objects from the Exchange Server.
You can use the Get-MailboxDatabase cmdlet to gather information about the database on a particular server or multiple servers.
The Mailbox Database cmdlet retrieves information from a specific database in your organization and is considered one of the best mailbox database cmdlet.

Using Get-MailboxDatabase Cmdlet in Exchange Server
To use the Get-MailboxDatabase cmdlet, the user must have the required roles and permissions.
- Advertisement -
To know and assign the required roles and permissions, follow these steps:
- Open Exchange Management Shell to execute the commands mentioned below and list the required roles and permission to run the Get-MailboxDatabase:
- $Perms = Get-ManagementRole -Cmdlet Get-MailboxDatabase
- $Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}
- Check and assign the roles and permissions using the New-ManagementRoleAssignment cmdlet or Exchange Admin Center (EAC).
- Running the cmdlet with no parameter will display information about all mailbox databases in your Exchange Server or organization.
METHODS TO RETRIEVE INFORMATION
To retrieve information about all the databases on a particular server in your Exchange organization, you need to follow these steps:
- Get-MailboxDatabase –server Exchange19 | Format-List
- Check the optionGet-MailboxDatabase -server Exchange19 | Format-list Name,Mounted,GUID,DistinguishedName
- Use the –identity parameter to get detailed or specific information about a particular database.
- You can see the option Get-MailboxDatabase –Identity MBXDB01 | Format-List
- Get-MailboxDatabase –Identity MBXDB01 | Format-Table Name,GUID,DistinguishedName
- Get-MailboxDatabase –Identity MBXDB01 | Format-list Name,GUID,DistinguishedName
- Using the -Status switch, you can gather all or specific information related to the database on a particular server, available free space in the database root, and information about the backup progress, mount status, and online maintenance progress to check the option “Get-MailboxDatabase –Status| Format-list”.
You can use the various parameters to fetch specific details or values mentioned below:
- CircularLoggingEnabled
- EdbFilePath
- DatabaseCopies
- MountedOnServer
- DeletedItemRetention
- AvailabileNewMailboxSpace
- LogFilePrefix
- IsMailboxDatabase
- IsPublicFolderDatabase
- Identity
- IndexEnabled
- IssueWarningQuota
Using Get-MailboxDatabase Cmdlet
- The Get-MailboxDatabase cmdlet checks the database status and information.
- The information received by executing the command checks whether the database is mounted and working or if there’s an issue.
- The appropriate actions to modify, repair, or manage the database using the Exchange Admin Center (EAC) or other PowerShell cmdlets in EMS can be implemented.
- To repair a dismounted database in the Dirty Shutdown state or database that doesn’t mount, you can use the Extensible Storage Engine Utility (EseUtil) to repair the corrupt database.
- You need to bring it to a clean shutdown or mountable state, and then mount the database using the EAC or Mount-Database cmdlet.
- You can use the Eseutil /r command to run ‘Soft Recovery’, which replays the transaction logs on the inconsistent or damaged database.
- This commits the uncommitted changes to the database and may bring the database to the Clean Shutdown state. To verify the database status, you can use the EseUtil/mh command in Command Prompt or EMS on your Exchange Server.
- If the database is still in a Dirty Shutdown state, you may proceed with ‘Hard Recovery’ using the EseUtil /p command.
- However, this may cause data loss. Thus, proceed at your own risk.
- The software can help you repair severely damaged or corrupt databases and save the mailboxes as individual PSTs.
- Once repaired and mounted, use the Get-MailboxDatabase –Identity | fl command to check the database details. To view specific information, you may also use the following command:
Get-MailboxDatabase –Status | ft name, server, mounted
12. Also, it is recommended that you move mailboxes from a repaired database to a new or existing healthy database and avoid using the repaired database.
CONCLUSION:
- The cmdlet helps administrators analyze the database status, detect problems, and take appropriate actions to resolve various issues.
- You can use the cmdlet to retrieve detailed information related to a database or specific information by using various parameters.
- Further, if you need to repair the database, then you can use the EseUtil commands or the Exchange recovery software.
- The software can extract all mailboxes from the corrupt database and restore them to a healthy database on your live Exchange Server directly.
Other useful topics, you would like to read on:
- Android 12 Features – Smartphone Brand & Models supporting Android 12
- 11 Best Cryptocurrency Exchange Apps
- WordPress Plugins for eCommerce to Boost your Business
- Android Safe Mode: How to Start? What are the Benefits?
- Battery Booster Apps: Top 10 for your Android in 2022
- GB WhatsApp – Ahead of WhatsApp? Above the DANGER?