Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 73
  • Last Modified:

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.

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
itadminhelp
Asked:
itadminhelp
  • 2
  • 2
  • 2
  • +1
1 Solution
 
Niten KumarPrincipal Systems AdministratorCommented:
alan.reid is a user

C:\>Get-MailboxFolderStatistics alan.reid -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"} | Select Name,FolderandSubFolderSize,ItemsinFolderandSubfolders
0
 
Senior IT System EngineerIT ProfessionalCommented:
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
 
Niten KumarPrincipal Systems AdministratorCommented:
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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
Todd NelsonSystems EngineerCommented:
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
 
itadminhelpAuthor Commented:
Got solution
0
 
Senior IT System EngineerIT ProfessionalCommented:
Which one ?
0
 
itadminhelpAuthor Commented:
got solution
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now