Jump to content

Recommended Posts

Posted

Hi

 

Just looking for a script that will display all the full mailboxes within exchange 2010 if its at all possible. I want to be able to export this list into a CSV aswell ideally. Any help or an explanation would be great thanks

 

Craig

Posted

Get-Mailbox | Get-MailboxStatistics | Where-Object { $_.TotalItemSize -ge 2GB} | format-table DisplayName,TotalItemSize

Get-Mailbox | Get-MailboxStatistics | Where-Object { $_.TotalItemSize -ge 2GB} | Export-Csv -Path C:\mailbox.csv

 

That should do it or be very close, you'll need to change the 2GB to whatever size is your max (or just under it would be better I think).

  • Thanks 1
Posted

A slight variation :

 

Get-MailboxStatistics -server | where {$_.StorageLimitStatus -ne "BelowLimit" } | Export-Csv -Path

  • Thanks 1
Posted

If anyone else is wanting to know this is the line I ended up with to produce what I wanted:

 

 

Get-mailbox –resultsize “unlimited” | get-mailboxstatistics | where-object {$_.TotalitemSize –ge 25MB} | select-object Displayname,LastLoggedonUserAccount,TotalItemSize,LastLogonTime | export-csv c:\mailbox

 

 

Must use select-object and not format-table because format-table should always be the last command. If it is not the CSV will not display correctly.

 

 

 

You can also use the following but it displays too much information to be useful, however you can run this to find out which columns you want to display and how to type it displayname,lastloggedonuseraccount etc

Get-Mailbox | Get-MailboxStatistics | Where-Object { $_.TotalItemSize -ge 2GB} | Export-Csv -Path C:\mailbox.csv

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...