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

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

Report on size of everyones mailbox in the last 30 days in Exchange 2010?

I want to get a list of the size of every mailbox with active data (last 30 days), is there a way to do this via powershell?

Thanks!
0
Rob Shorts
Asked:
Rob Shorts
1 Solution
 
MASTechnical Department HeadCommented:
0
 
Todd NelsonSystems EngineerCommented:
Are you looking for a calculation of only the amount of data received within the past 30 days by all mailboxes; or are you asking for a list of mailboxes accessed in the last 30 days with their total mailbox sizes?

Assuming the latter...

If I understand what you are asking this command should provide you with the information you are requesting (displayed in the shell)...

Get-Mailbox | Get-MailboxStatistics | Where-Object {$_.Lastlogontime -ge (Get-Date).AddDays(-30)} | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount,LastLogonTime

Open in new window



If you need the info output to an CSV file that can be sorted in Excel, use this command...

Get-Mailbox | Get-MailboxStatistics | Where-Object {$_.Lastlogontime -ge (Get-Date).AddDays(-30)} | Sort-Object TotalItemSize -Descending | Select-Object DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount,LastLogonTime | Export-CSV "C:\MailboxSizes.csv" -NoTypeInformation

Open in new window


Let us know.
1
 
Rob ShortsAuthor Commented:
Thank you!!!
0

Featured Post

Lessons on Wi-Fi & Recommendations on KRACK

Simplicity and security can be a difficult  balance for any business to tackle. Join us on December 6th for a look at your company's biggest security gap. We will also address the most recent attack, "KRACK" and provide recommendations on how to secure your Wi-Fi network today!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now