Solved

Powershell Exchange 2010 mailbox size by OU

Posted on 2014-02-24
4
495 Views
Last Modified: 2014-04-17
Is there a way I can get the total mailbox size by OU automated. I have like 90 OU's and listing them can be a pain.

get-mailbox -OrganizationalUnit "OU=Managememt,OU=Staff,DC=company,DC=co,DC=uk" | Get-MailboxStatistics | Select @{Name="Size";Expression={$_.TotalItemSize.Value.ToMB()}} |
0
Comment
Question by:techdrive
4 Comments
 
LVL 9

Expert Comment

by:Sean
ID: 39883697
This should do it, you may need to output it to a csv.

foreach ($i in (Get-ADOrganizationalUnit -result unlimited)) { get-mailbox -OrganizationalUnit $i | Select @{Name="Size";Expression={$_.TotalItemSize.Value.ToMB()}}}
0
 
LVL 18

Accepted Solution

by:
suriyaehnop earned 500 total points
ID: 39884532
$Mailboxes = Get-Mailbox -OrganizationalUnit "OU=Managememt,OU=Staff,DC=company,DC=co,DC=uk"

Foreach ($Mbx in $Mailboxes){

Get-MailboxStatistics -Identity $mbx.alias | Select @{Name="Size";Expression={$_.TotalItemSize.Value.ToMB()}}
} 

Open in new window

0
 
LVL 5

Expert Comment

by:Pankaj_401
ID: 39885012
Hi Techdrive,
Any update from above suggested cmdlets ?
Moreover, you can have check this link also (http://www.exchangereports.net/) to get auto emails of mailbox size reports with granular level filter option.
0
 

Author Comment

by:techdrive
ID: 39885758
I like suriyaehnops post going to try it.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now