Useful statistics commands for Exchange 2010 powershell


This example retrieves the mailbox statistics for a mailbox by using the alias AylaKol.

 
 
Get-MailboxStatistics -Identity AylaKol

This example retrieves the mailbox statistics for all mailboxes on the server MailboxServer01.

 
 
Get-MailboxStatistics -Server MailboxServer01

This example retrieves the mailbox statistics for the specified mailbox.

 
 
Get-MailboxStatistics -Identity contoso\chris

This example retrieves the mailbox statistics for all mailboxes in the specified mailbox database.

 
 
Get-MailboxStatistics -Database "Mailbox Database"

This example retrieves the mailbox statistics for all disconnected mailboxes. This example uses a WHERE clause. The $_ variable is used to specify the object passed on the pipeline. The -ne operator means not equal.

 
 
Get-MailboxStatistics | Where {$_.DisconnectDate -ne $null}

This example returns the summary move history for the completed move request for Ayla Kol’s mailbox. If you don’t pipeline the output to the Format-List cmdlet, the move history doesn’t display.

 
 
Get-MailboxStatistics -Identity AylaKol -IncludeMoveHistory | Format-List

This example returns the detailed move history for the completed move request for Ayla Kol’s mailbox. This example uses a temporary variable to store the mailbox statistics object. If the mailbox has been moved multiple times, there will be multiple move reports. The last move report is always MoveReport[0].

 
 
$temp=Get-MailboxStatistics -Identity AylaKol -IncludeMoveHistory
$temp.MoveHistory[0]

This example returns the detailed move history and a verbose detailed move report for Ayla Kol’s mailbox. This example uses a temporary variable to store the move request statistics object and outputs the move report to a CSV file.

 
 
$temp=Get-MailboxStatistics -Identity AylaKol -IncludeMoveReport
$temp.MoveHistory[0] | Export-CSV C:\MoveReport_AylaKol.csv
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