Exchange 2010 – Useful and reported cmdlets


This post will try to provide you some useful cmdlets which can by used for Exchange 2010 environment.

How to get top largest mailboxes through all databases? Just change number under -First parameter for increasing top.

Get-MailboxDatabase | Get-mailbox | Get-MailboxStatistics |Sort-Object TotalItemSize -Descending | Select-Object -First 10 | ft DisplayName,Database,Totalitemsize -a

How to get database size, database white-space (free space for new data in edb file), mailbox count and disconnected mailbox count for all databases in your organization.

Get-MailboxDatabase -status | sort name |select-object Name,AvailableNewMailboxSpace,DatabaseSize,@{Name="MailboxCount";Expression={(Get-Mailbox -Database $_.name).Count}},@{Name="DisabledMailboxCount";Expression={(Get-MailboxDatabase $_.Name|Get-MailboxStatistics| where {$_.DisconnectReason -ne $null}).count}}

How to get an overview for all databases regarding to mailbox sizes (specially for TotalItemSize)

Get-MailboxDatabase | Get-MailboxStatistics | %{$_.TotalItemSize.Value.ToMB()} | Measure-Object -sum -average -max -min

How to get an overview for all databases regarding to their white-space and sizes

Get-MailboxDatabase -Status | ft name,AvailableNewMailboxSpace,DatabaseSize -a

More soon…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s