cragos1984 Posted April 24, 2015 Posted April 24, 2015 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
halbaradkenafin Posted April 24, 2015 Posted April 24, 2015 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). 1
pcstru Posted April 24, 2015 Posted April 24, 2015 A slight variation : Get-MailboxStatistics -server | where {$_.StorageLimitStatus -ne "BelowLimit" } | Export-Csv -Path 1
cragos1984 Posted April 24, 2015 Author Posted April 24, 2015 Thanks for pointing me in the right direction guys this gives me a nice starting point
cragos1984 Posted April 24, 2015 Author Posted April 24, 2015 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now