Solved

Is it possible to supply me with a list of Exchange users and the number of items in each users "inbox" and "Sent Items" folders.

Posted on 2016-10-17
7
53 Views
Last Modified: 2016-10-19
Is it possible to supply me with a list of Exchange users and the number of items in each users "inbox" and "Sent Items" folders.

We are on Exchange 2010.
All users are on one Organisational Unit.(OU)

Any good powershell script we can use.
0
Comment
Question by:itadminhelp
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 6

Expert Comment

by:Niten Kumar
ID: 41847663
alan.reid is a user

C:\>Get-MailboxFolderStatistics alan.reid -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"} | Select Name,FolderandSubFolderSize,ItemsinFolderandSubfolders
0
 
LVL 7

Expert Comment

by:Senior IT System Engineer
ID: 41847666
Hi IT,

I'm using this script: http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010

It does more than waht you ask for, but then you can trim or edit the CSV result yourself.

Hope that help.
Get-MailboxReport.ps1.TXT
0
 
LVL 6

Expert Comment

by:Niten Kumar
ID: 41847678
To get a report for all mailboxes you can try creating a script as shown below:

$mailboxes = @(Get-Mailbox -ResultSize Unlimited)
$report = @()

foreach ($mailbox in $mailboxes)
{
    $inboxstats = Get-MailboxFolderStatistics $mailbox -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}

    $mbObj = New-Object PSObject
    $mbObj | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $mailbox.DisplayName
    $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Size (Mb)" -Value $inboxstats.FolderandSubFolderSize.ToMB()
    $mbObj | Add-Member -MemberType NoteProperty -Name "Inbox Items" -Value $inboxstats.ItemsinFolderandSubfolders
    $report += $mbObj
}

$report



Saving that as Get-InboxReport.ps1 I can then run it in the Exchange Management Shell.

[PS] C:\Scripts>.\Get-InboxSize.ps1

Output it to CSV file for further analysis.

[PS] C:\Scripts>.\Get-InboxSize.ps1 | Export-CSV inboxsizes.csv


You can modify the above script to add Sent Items folder.
0
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

 
LVL 15

Accepted Solution

by:
Todd Nelson earned 500 total points
ID: 41847681
This will do it, with output to CSV file for each mailbox's Inbox and Sent Items.

Get-Mailbox | Get-MailboxFolderStatistics | Where-Object {$_.Name -match “Inbox|Sent Items”} | Select-Object Identity,Name,ItemsInFolder,FolderSize | Export-Csv C:\MailboxItemCount.csv -NoTypeInformation

Open in new window

0
 

Author Comment

by:itadminhelp
ID: 41849437
Got solution
0
 
LVL 7

Expert Comment

by:Senior IT System Engineer
ID: 41849442
Which one ?
0
 

Author Closing Comment

by:itadminhelp
ID: 41849847
got solution
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

809 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