I've found numerous codes online and have created the following to run a basic report on quotas and sizes of mailboxes on our SBS 2008 server (Exchange 2007):
get-mailbox -server HYDROMAIN -ResultSize unlimited | ft DisplayName,ProhibitSendReceiveQuota,ProhibitSendQuota,@{label="Mailbox Size(MB)";expression={(get-mailboxstatistics $_).TotalItemSize.Value.ToMB()}}
I would like to run the same report, weekly (on, say, Friday's), automatically, but have the report sorted from largest mailbox size to smallest. The report can be emailed in a .txt file or just in the body of the email. Or would it be better to sort by mailboxes that are the closest to their quotas? Or, is it possible to sort by mailbox size, and highlight (or differentiate) ones that are close to (or surpassed) their quotas?
Email sent to one specified address with custom subject and body header above the actual content (if not attached in .txt).
Would anyone be able to help me out? This is slightly above my understanding of the Exchange PowerShell. I'm very new to it and have only been using it for a few weeks.
I know it's probably pretty basic but I've been unable to get anything to work.
Thanks :)