locked
can i export the recipient mailboxes showing "total items" RRS feed

  • Question

  • in the General tab, i see the "Total Items" for each user mailbox - is there a way to get this dumped out to txt for the entire store?

    ~if this were /. this sig would be funny

    Thursday, September 6, 2012 2:32 PM

Answers

  • You should be able to do this from the EMS with the following:

    Get-MailboxDatabase "your_database_name" | Get-MailboxStatistics | ft displayname, itemcount >C:\file_name.txt


    -Matt


    • Edited by Matt_B_ Thursday, September 6, 2012 3:21 PM added parameter to dump to text file
    • Marked as answer by Noya Lau Monday, September 24, 2012 6:31 AM
    Thursday, September 6, 2012 3:19 PM
  • get-mailbox | get-mailboxstatistics |fl displayname, itemcount >c:\export.txt

    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com


    • Edited by Jamestechman Thursday, September 6, 2012 3:23 PM
    • Marked as answer by Noya Lau Monday, September 24, 2012 6:31 AM
    Thursday, September 6, 2012 3:23 PM

All replies

  • You should be able to do this from the EMS with the following:

    Get-MailboxDatabase "your_database_name" | Get-MailboxStatistics | ft displayname, itemcount >C:\file_name.txt


    -Matt


    • Edited by Matt_B_ Thursday, September 6, 2012 3:21 PM added parameter to dump to text file
    • Marked as answer by Noya Lau Monday, September 24, 2012 6:31 AM
    Thursday, September 6, 2012 3:19 PM
  • get-mailbox | get-mailboxstatistics |fl displayname, itemcount >c:\export.txt

    James Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com


    • Edited by Jamestechman Thursday, September 6, 2012 3:23 PM
    • Marked as answer by Noya Lau Monday, September 24, 2012 6:31 AM
    Thursday, September 6, 2012 3:23 PM
  • clean and simple, thanks!

    ~if this were /. this sig would be funny

    Thursday, September 6, 2012 3:31 PM
  • also works, and more "human friendly" but i prefer the single line approach of Matt B so i can bring it into Excel.

    thanks guys!


    ~if this were /. this sig would be funny

    Thursday, September 6, 2012 3:33 PM
  • On Thu, 6 Sep 2012 15:33:30 +0000, can_i_bum_a_sig wrote:
     
    >also works, and more "human friendly" but i prefer the single line approach of Matt B so i can bring it into Excel.
     
    "One-liners" aren't always the best thing to use. If "displayname" has
    a comma in it (e.g. "Smith, John") you'll have a problem.
     
    Something like this is longer, but gets you a real CSV file with
    delimeter protection:
     
    $List = @()
    Get-MailboxDatabase "your_database_name" | Get-MailboxStatistics |
    foreach {
    $x = ""|select DisplayName,Itemcount
    $x.DisplayName = $_.DisplayName
    $x.Itemcount = $_.ItemCount
    $list += $x
    }
    $list | export-csv <filename> -notypeinfo
     
    You can expand upon that to get information from other cmdlets into
    the CSV, too.
     
    ---
    Rich Matheisen
    MCSE+I, Exchange MVP
     

    --- Rich Matheisen MCSE+I, Exchange MVP
    Thursday, September 6, 2012 9:43 PM
  • I do agree with Rich about one-liners, and there limitations, but to defend the one-liners (and fellow slackers like myself :)) ...you can still do this same query in a one-liner, if having a CSV output is what your after:

    #

    Get-MailboxDatabase "your_database_name" | Get-MailboxStatistics | select displayname, itemcount | export-csv c:\file_name.csv -NoTypeInformation


    -Matt

    Friday, September 7, 2012 1:37 PM
  • In addition, you can also try the following cmdlet. Hope it is useful.

    Get-MailboxStatistics -Database “Mailbox Database” | Select DisplayName, ItemCount | Export-Csv C:\Filename.csv

    Noya Lau

    TechNet Community Support

    Monday, September 10, 2012 9:07 AM