annayeg
asked on
exchange 2007 mailbox size
Hi,
I am trying to get a report that will list all the mailboxes that are less than 10 GB. I've used the following command but is gives me a lot of information that I do not need and it lists them by Byte size not GB.
get-mailbox |get-mailboxstatistics | export-csv test.csv| sort-object totalitemsize -descending |ft DisplayName,@{label="Total ItemSize(M B)";expres sion={$_.T otalItemSi ze.Value.T oMB()}},It emCount
I am trying to get a report that will list all the mailboxes that are less than 10 GB. I've used the following command but is gives me a lot of information that I do not need and it lists them by Byte size not GB.
get-mailbox |get-mailboxstatistics | export-csv test.csv| sort-object totalitemsize -descending |ft DisplayName,@{label="Total
I agree with Suliman.
For more details on powershell commands
Go get it at http://go.microsoft.com/?linkid=5719336
For more details on powershell commands
Go get it at http://go.microsoft.com/?linkid=5719336
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi guys,
I tried pasting the above code in a notepad and rename it mailboxsize.ps2, but when I run it from EMS it opens up the code.
Is there anything that I need to paste in the script?
Thanks
I tried pasting the above code in a notepad and rename it mailboxsize.ps2, but when I run it from EMS it opens up the code.
Is there anything that I need to paste in the script?
Thanks
it should be .ps1 and not .ps2
Get-MailboxStatistics | export-csv test.csv | where {$_.ObjectClass -eq "Mailbox"} | Sort-Object TotalItemSize -Descending | ft DisplayName,TotalItemSiza,
and arrange them using excel to remove mailboxes larger then 10 GB