Avatar of Kelly Garcia
Kelly Garcia
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Powershell Exchange mailboxsizes

Hi All,

I need a powershell script that will tell me mailboxes above 1gb, I then need the name and email address and the move this mailboxes to a different dag. how do I do this?

thank you in advance.

PowershellExchangeScripting Languages

Avatar of undefined
Last Comment
Tom Cieslik

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Tom Cieslik

To see maiboxes grader than 1GB you can use this command

get-mailbox | Get-MailboxStatistics | where {$_.TotalItemSize -ge 1GB} |Sort-Object TotalItemSize

To export list to c:\temp\MailboxesOver1GB.csv   (C:\Temp must exist on Exchange server)

get-mailbox | Get-MailboxStatistics | where {$_.TotalItemSize -ge 1GB} |Sort-Object TotalItemSize |Export-CSV c:\temp\MailboxesOver1GB.csv

To move it to different DAG you need to specify some more information about it.
Tom Cieslik

This will give you all information about mailbox but if you want to limit it only to DisplayName and mailbox size then use this:

get-mailbox -ResultSize Unlimited | Get-MailboxStatistics | where {$_.TotalItemSize -ge 3GB} |Sort-Object TotalItemSize -Descending |Select-Object DisplayName,TotalItemSize |Export-CSV c:\temp\mailboxesOver3GB.csv
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.