locked
Inbox statistics only - no sub folders RRS feed

  • Question

  • Hi

    I need to be able to see report on how many emails are in only users inboxes and not any of its sub-folders.  For example:

    User1\Inbox    512    9951273B

    User2\Inbox    15      159B

    .....

    and not

    User1\Inbox 512 9951273B

    User1\Inbox\First Folder 29     632B

    User1\Inbox\SecondFolder 16  632B

    ....

    I have been using

    Get-Mailbox|Select-Object alias |ForEach-Object{Get-MailboxFolderStatistics -Identity $_.alias -FolderScope inbox|Select-Object Identity,ItemsInFolder,FolderSize} |out-file C:\MailboxReport.txt

    but it brings in too much detail.  I'd love just to be able to run the cmd line and email it to my bosses.

    Any help would be much appreciated.

    Laura

     

    Tuesday, August 30, 2011 2:10 PM

Answers

  • Try this:

     

    Get-Mailbox|
    Select-Object alias |
    ForEach-Object{
        Get-MailboxFolderStatistics -Identity $_.alias -FolderScope inbox|
        where {$_.identity -like "*\Inbox"} |
        Select-Object Identity,ItemsInFolder,FolderSize} |
    out-file C:\MailboxReport.txt


    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
    • Proposed as answer by Sophia Xu Thursday, September 1, 2011 7:47 AM
    • Marked as answer by Sophia Xu Tuesday, September 6, 2011 1:20 AM
    Tuesday, August 30, 2011 2:30 PM