butlerkillo.blogg.se

Check mailbox size exchange 2010
Check mailbox size exchange 2010






check mailbox size exchange 2010

$Mailboxes | Sort-Object MailboxSizeMB -Desc | Select PrimarySMTPAddress, MailboxSizeMB $Mailbox | Add-Member -MemberType “NoteProperty” -Name “MailboxSizeMB” -Value ((Get-MailboxStatistics $Mailbox).()) $Mailboxes = Get-Mailbox -ResultSize Unlimited i didnt come up with this, i just found it ***if this is what you were looking for, please click this link and give the guy some credit. once you have the data on all your mailboxes, and the output can be IMPORTED into excel you can do all your sorting etc and delete whatever you dont want The other half of the information you need is in Get-Mailbox :- found answer in following link. Problem is, Get-MailboxStatistics output just a display name – not unique and cant really be used as such. There’s also a handy guide on this at Petri as well. You can find a good description of the get-mailboxstatistics cmdlet over at this TechNet page. Likewise, if you just want to create a new file each time (no append) then you would want to use ‘>’ instead. If it does exist, it will append the new output to the end of the current file. The ‘>’ creates a new text file if one didn’t already exist. Try running the script without it, you’ll see what I mean.Īnd lastly, we throw the output into a text file.

check mailbox size exchange 2010

We also add some handy labels to the top of the display so we know what it is exactly we are looking at when we happen to stumble upon this file a year down the road or have to send it of to someone else to decipher. You may notice this bit of code: $_.() That is converting the mailbox size (which is stored as bytes) to MB. Specifically we want to sort in a descending order by mailbox size then name. Basically we are then piping the mailbox data to get sorted. Get-MailboxStatistics -database ‘Exchange Mailbox Database’ | where

check mailbox size exchange 2010

For my purposes, this was all that was needed. Granted, this could be larger and uglier depending upon how many mailbox statistics fields you required. Here’s a script I put together for Exchange 2010 to grab the mailbox size for all the users in my Exchange mailbox database, formatted, and saved to a text file.








Check mailbox size exchange 2010