Skip to Main Content
Microsoft Exchange 2010 PowerShell Cookbook
book

Microsoft Exchange 2010 PowerShell Cookbook

by Mike Pfeiffer
July 2011
Intermediate to advanced content levelIntermediate to advanced
480 pages
11h 54m
English
Packt Publishing
Content preview from Microsoft Exchange 2010 PowerShell Cookbook

Reporting on the mailbox size

Using cmdlets from both the Exchange Management Shell and Windows PowerShell gives us the ability to generate detailed reports. In this recipe, we will use these cmdlets to report on all of the mailboxes within an organization and their total size.

How to do it...

  1. Use the following one-liner to generate a report of each mailbox in the organization and the total mailbox size:
    Get-MailboxDatabase | Get-MailboxStatistics | 
      ?{!$_.DisconnectDate} | 
        Select-Object DisplayName,TotalItemSize
  2. Pipe the command even further to export the report to a CSV file that can be opened and formatted in Excel:
    Get-MailboxDatabase | Get-MailboxStatistics | ?{!$_.DisconnectDate} | Select-Object DisplayName,TotalItemSize | Export-CSV c:\mbreport.csv ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Jonas Andersson, Mike Pfeiffer

Publisher Resources

ISBN: 9781849682466Other