We help IT Professionals succeed at work.

List/ count of mailboxes on Exchange 2010 server

bruce_77
bruce_77 asked
on
Hi

Running Exchange 2010 SP1. We have one DAG across two sites.

One of the servers needs some maintenance, LONMBX1. I need to verify the number of mailboxes on this server and their names before we reboot.

Does anyone know how I can do this? With Exchange 2007, I could go into the EMC and filter for "Server" when pulling a list of mailboxes. This is not possible with Exchange 2010, there is no way to filter mailboxes by Server.

Is there a Powershell command I can run to get the names of mailboxes on this server and the count?
Comment
Watch Question

Commented:
This command should get what you need;

Get-ExchangeServer 'ExchSvr' | Get-MailboxStatistics | Format-Table -AutoSize Database, @{label=”Display Name”;expression={$_.DisplayName}}, LastLoggedOnUserAccount,@{label="Item Count";expression={$_.ItemCount}}, LastLogonTime,LastLogoffTime | Out-File C:\temp\mailboxes.txt -Width 500

Commented:
Attached is a simplified command which list all the mailboxes on the specified server then also returns the statistics for these mailboxes.

hope this is what your looking for.
get-mailbox | where{$_."servername" -eq "lonmbx1"} | get-mailboxstatistics

Open in new window

Commented:
A Slightly different way,
get-mailbox | where{$_."servername" -eq "LONMBX1"} | get-mailboxstatistics | ft displayname, last
logontime, lastlogofftime, servername, database

Open in new window