Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Powershell Exchange 2010 mailbox size by OU

Posted on 2014-02-24
4
Medium Priority
?
526 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 11

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 19

Accepted Solution

by:
suriyaehnop earned 2000 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

How to effectively resolve the number one email related issue received by helpdesks.
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

926 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