We help IT Professionals succeed at work.

Powershell Exchange mailboxsizes

189 Views
Last Modified: 2017-03-29
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.

regards,
kelly
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Tom CieslikIT Superintendent
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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 CieslikIT Superintendent
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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