Exchange Powershell
In recent months both myself and powershell are becoming best buds. I love the way how it makes my life so much easier. I’ve been asked by plenty of customers for a comprehensive list of mailboxes on their IT systems, you can find out by entering the following powershell command on Microsoft Exchange 2007, 2010 and 2013 servers:
get-mailbox –resultsize unlimited | get-mailboxstatistics | select-object DisplayName,TotalItemSize,LastLogonTime | Sort-Object DisplayName
The above command will display a list of mailboxes sorted by the DisplayName field, the size of mailbox and when they last logged on.
If you would like to output this to a text file to send to someone you can use:
get-mailbox –resultsize unlimited | get-mailboxstatistics | select-object DisplayName,TotalItemSize,LastLogonTime | Sort-Object DisplayName > C:\list-of-mailboxes.txt
Enjoy