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
49 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 14

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
how to add IIS SMTP to handle application/Scanner relays into office 365.

770 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