Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We are going to be implementing personal archives for Exchange in our organization. For us to get a good grasp on how much space is needed, we need to get an idea of the age of items that we currently have. Is it possible to have a powershell script that tells me the total size and number of items given certain date ranges of all mailboxes in all databases?

What I'd like to have is the 1) number of items, 2) total size of times (GB) - all grouped by date ranges (Less than 15 days, 15-30 days, 30-60 days, 60-90 days, more than 90). Another possibility would be to have it also grouped by mailbox database

share|improve this question
add comment

2 Answers 2

http://exchangeserverpro.com/powershell-script-create-mailbox-size-report-exchange-server-2010

Get-mailboxstatistics is the cmdlet for you .... Above is a good write up and a script to get the info you are after ....

Hope this helps

$date = (Get-Date).toString(‘yyyy-MM-dd’)
Get-MailboxFolderStatistics "username" | sort-object itemsinfolder -descending | ft Folder, FolderPath, ItemsInFolder, FolderSize -auto | export-csv -path $date.csv

http://stackoverflow.com/questions/8980195/exchange-mailbox-traffic-auditing

You can also investigate message tracking logs :
http://www.simple-talk.com/content/print.aspx?article=681

share|improve this answer
    
It's a start, but is there a way using get-mailboxstatistics to apply a date limit (e.g: received>=xxx and received<=xxx ? –  marcwenger Nov 7 '12 at 1:19
    
Referring to added in script: forgive my ignorance, but that looks like all it does it grabs all file info and labels the output file with the current date. It doesn't grab data by date range –  marcwenger Nov 8 '12 at 1:01
add comment

For anyone coming across this page while doing a search, a much more complete solution is detailed at http://gsexdev.blogspot.com/2012/10/reporting-on-item-age-count-and-size-in.html

share|improve this answer
    
Welcome to Server Fault! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info. –  slm May 3 '13 at 18:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.