About Me

My photo
"Smoke me a kipper, I'll be back for Breakfast" - one man's journey through life with IT and all things related to it whether it's purely technical or just for fun...

Note - Any posts on this blog are purely my own personal opinion and do not reflect any opinions of companies and/or people that I mention. All advice is given to help you but I cannot be held responsible for your actions should you decide you want to try these things out yourself!

Monday 6 February 2012

PowerShell - Easy Mailbox Stats Gathering

Just a quick bit of PowerShell for those that use it as often as I do.  This is something I created a long time back for reporting against user mailbox sizes.  You can tailor it to your own needs of course if you know the right attributes:

Get-mailboxstatistics –Server GLL-EXCHMB-01 | select-object servername, storageGroupname, databasename, DisplayName, @{name="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},StorageLimitStatus,LastLogonTime, LastLoggedOnUserAccount,ItemCount, DeletedItemCount | export-csv c:\Server_Stats.csv

Have fun!

No comments:

Post a Comment