cmdlet for querying users inbox

Posted on 2014-07-14
Last Modified: 2014-07-31
i have over 600 users. i would like to know who has the most emails in their inbox. is there a cmdlet for powershell to give me these stats?

Question by:ttrbrtsn
    LVL 19

    Expert Comment

    by:Adam Farage
    You can get a nice report by using a powershell script I always use, which is Get-MailboxReport from Paul Cunningham:

    I would recommend this. You can format the Excel spreadsheet out so it is presentable, and then figure out who has what in each folder listed within the mailbox. I use this report all the time for Exchange sizing.
    LVL 14

    Expert Comment

    by:Justin Yeung
    Get-Mailbox -Database DatabaseName -resultsize unlimited | % {Get-MailboxStatistics $_ | select DisplayName,ItemCount | Sort-Object ItemCount}
    LVL 18

    Accepted Solution

    Do the 600 users are on same DB or located on different DB. If they are on same DB then you can use cmdlet posted by Justin but if they are on different DB the best way to use preparing the CSV file.

    Say, your CSV has Username as header..


    Import-Csv C:\Filename.csv | foreach { Get-MailboxStatistics $_.Username } | Format-Table Displayname,ItemCount

    Open in new window


    Author Closing Comment

    not exactly what im looking for

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Too many email signature changes to deal with?

    Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
    In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now