Albert Widjaja
asked on
How to get the mailbox size for each and total of a specific OU ?
Hi,
By using Powershell, is there any way to get the mailbox size for each of the member of specific OU and display the total at the bottom ?
This is for Exchange Server 2007
By using Powershell, is there any way to get the mailbox size for each of the member of specific OU and display the total at the bottom ?
This is for Exchange Server 2007
Try this..
$UserList | Select * | Export-Csv C:\report.csv -NoTypeInformation
$UserList = Get-mailbox –OrganizationalUnit “Domain.com/IT/Users” -ResultSize Unlimited | Get-MailboxStatistics
$UserList | Select Displayname,TotalItemSize;`
Write-host "`nTotal mailbox size $(($UserList | %{$_.TotalItemSize.value.toMB()} | Measure-Object -Sum).sum) MB"
If required you can export the details to .csv file using$UserList | Select * | Export-Csv C:\report.csv -NoTypeInformation
ASKER
Subsun,
Thanks for the script,
but somehow the ItemSize is still displayed in Bytes, any idea how to change it into Mega Bytes or even Gigabytes ?
Thanks for the script,
but somehow the ItemSize is still displayed in Bytes, any idea how to change it into Mega Bytes or even Gigabytes ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, that only changes the total sum at the bottom but not per mailbox size ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks !
http://www.msexchange.org/articles-tutorials/exchange-server-2007/management-administration/getting-mailbox-statistics-exchange-2007.html