cmdlet for querying users inbox

Posted on 2014-07-14
Medium Priority
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 20

Expert Comment

by:Adam Farage
ID: 40194733
You can get a nice report by using a powershell script I always use, which is Get-MailboxReport from Paul Cunningham: http://exchangeserverpro.com/get-mailboxreport-ps1-v1-02-released/

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
ID: 40194772
Get-Mailbox -Database DatabaseName -resultsize unlimited | % {Get-MailboxStatistics $_ | select DisplayName,ItemCount | Sort-Object ItemCount}
LVL 19

Accepted Solution

suriyaehnop earned 1500 total points
ID: 40195190
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

ID: 40232672
not exactly what im looking for

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Just after setting up Cloud PBX connectivity and migrated Skype users to SFBO, we noticed inbound calls not working but outbound calls would work.
What is the biggest problem in managing an exchange environment today? It is the lack of backups, disaster recovery (DR) plan, testing of the DR plan or believing that it won’t happen to us.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

607 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