Solved

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

Posted on 2016-10-17
3
71 Views
Last Modified: 2016-10-20
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
Comment
Question by:Rob Shorts
3 Comments
 
LVL 25

Expert Comment

by:-MAS
ID: 41846847
0
 
LVL 14

Accepted Solution

by:
Todd Nelson earned 500 total points
ID: 41847077
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
 

Author Closing Comment

by:Rob Shorts
ID: 41853037
Thank you!!!
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
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…

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now