I work very little with Exchange so I apologize if I seem clueless. What I’m trying to do is query the size of all mailboxes and e-mail that information to myself once a week. Currently I log into our exchange server and run a shell command to output this information to a text file. That command is:
Get-MailboxStatistics |where {$_.TotalItemSize -gt 1MB} | sort $_.TotalItemSize |FT DisplayName,ItemCount,TotalItemSize >c:\size.txt
I would really like to have this automated and e-mailed to myself once a week. How would I go about setting this up?
You can put the following in a script file and schedule it to run once a week: