Get-MailboxDatabase For Exchange 2010
This PowerShell cmdlet allows you to interrogate the Exchange Database(s) without having to call for the EMC.
- Getting Started with Get-MailboxDatabase
- List the Get-MailboxDatabase Parameters
- Research Properties for Get-MailboxDatabase
- Where Next with Get-MailboxDatabase?
On its own the Get-MailboxDatabase cmdlet returns information about all the Exchange mailboxes in your organization.
Note 1: You can refine the output by specifying one of your servers.
Get-MailboxDatabase -Server Mbox03
Note 2: Another technique is to employ the -Identity parameter to display just one Exchange database.
Get-MailboxDatabase -Identity MailDb02
Research optional but useful parameters with Get-Help:
Use the fruits of your research to include ‘Status’ because it forces the cmdlet to include real-time information. For example, try this script with and without the -Status switch.
Get-MailboxDatabase -Identity MailDb02 -Status | Format-List
Status is useful for investigating backup problems on your Exchange Server 2010 with the mailbox role.
Get-MailboxDatabase -Identity MailDb02 | Get-Member
Interesting properties include mounted, you can incorporate the knowledge in your scripts thus:
Get-MailboxDatabase MailDb02 | Format-Table, Name, Server, Mounted -auto
Note 3: Naturally you need to change the values to suit your server.
Here is a free tool to monitor your Exchange Server. Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.
This is the real deal – there is no catch. SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.
Exchange 2010 Permissions
If you think about it, being able to connect an Exchange Server is a responsible task. Thus before you execute the above PowerShell scripts check that you must are a member of these exchange groups:
- ‘Organization Management role group’
- ‘Server Management management role group’
Management management is not a typo!
Instead of the Exchange Management Console (EMC) try this PowerShell command:
New-ManagementRoleAssignment -Role "Organization Management role" -User YourName
Compare PowerShell with the EMC
From a learning point-of-view it it’s worth a walk-through in the Exchange Management Console (EMC), the benefit is you can compare the PowerShell script with what you see in the Exchange GUI.
- Launch your EMC, navigate to the Server Configuration (see below.)
Note 5: This GUI does not display all the information about your Exchange Server 2010 that is available to PowerShell.
Note 6: There is also Set-ExchangeServer for times when you want to change Active Directory settings such as global catalog.
Import users from a spreadsheet, complete with their mailbox. Just provide a list of the users with the fields in the top row, and save as .csv file. Then launch this FREE utility, match your Exchange fields with AD’s attributes, click and import the users. Optionally, you can provide the name of the OU where the new mailboxes will be born.
- Bulk-import new users and mailboxes into Active Directory.
- Seek and zap unwanted user accounts.
- Find inactive computers.
Summary of Get-MailboxDatabase
If you want to investigate the Exchange Server then Get-MailboxDatabase will show which roles are installed, for example, ClientAccess or Edge. If you research the properties then you can add PowerShell commands to enumerate version numbers. Remember to append the -Status parameter to ensure that you see real-time data.
If you like this page then please share it with your friends