veiwing mailbox sizes in exchange 2007
Is it me or is Exchange 2007 missing mailbox size? i cant anywhere to veiw the size of a users mailbox.
October 26th, 2006 12:45pm

Looks like this cmdlet does the trick: get-mailboxstatistics | fl displayname,totalitemsize
Free Windows Admin Tool Kit Click here and download it now
October 30th, 2006 8:38pm

As already said it was this feature was left out of the console in RTM and SP1 for some unknown reason.But the data is still available via command shell; the script given will dump you the data alphabetically and in bits in the command shell.Another variation Get-MailboxStatistics that I have found gives you a more user friendly output is Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount This script will list all mailboxes starting with the largest then Descending down the page it will also give you number of items in each mailbox and list size in MB. You can adjust the Size metric given by changing {$_.TotalItemSize.Value.ToMB()} to ether {$_.TotalItemSize.Value.ToKB()} or if you are unlucky {$_.TotalItemSize.Value.ToGB()}. Also if you would like to change the listing at the top of the report make a similar change to the "TotalItemSize(MB)" expression. Hope this helps J
May 29th, 2008 7:04pm

I had documented it with some of theexamples... EMC - Where are Mailbox Total Items & Size (KB)Columns?
Free Windows Admin Tool Kit Click here and download it now
May 29th, 2008 7:38pm

How utterly stupid is it to leave out one of the most important pieces of information an Exchange admin can have? The more I see of Ex2K7 the more I think MS should have postponed it's release until they actually finished writing the code.3/10. Must try harder.
July 1st, 2008 5:59pm

If you want to see the size of just one mailbox - just go to the properties of the mailboxand you can see the size and total number of items under the General Tab. Though I agree the way Exchange 2003 showedthe sizewas a lot more useful.
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2008 11:19am

Hi guys, do you know how to do if I want to display the total size for all the mailboxes store on a certain Storage Group or Server? Thanks, Marcelo.
October 3rd, 2008 11:21pm

Hi Marcelo, Check the article which I gave in myabove post.
Free Windows Admin Tool Kit Click here and download it now
October 3rd, 2008 11:24pm

OK, I'm not having much luck with the cmdlet - I'm sure it's me - it's that kind of week. In the Exch Management Shell I typed: Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount I get nothing. I need chocolate.
October 28th, 2008 11:08pm

I just installed the Exchange 2003 Management Tools on another server and use it to view the new Exchange 2007 mailboxes. Take care not to use this tool to do any management of the system, but using it to view is no problem.
Free Windows Admin Tool Kit Click here and download it now
November 12th, 2008 6:28pm

There is a nice tool called Message Stats that can provide this one as well as many other exchange related reports and metrics. Hope this helps! http://www.questmessagestats.com
February 11th, 2009 7:22pm

Here's my contribution. I wrote this script to include some additional information in the Mailbox size report:Get-User -ResultSize Unlimited | Where {$_.RecipientType -eq "UserMailbox"} | Select DisplayName, Company, City | foreach { $MailboxInfo = Get-Mailbox -identity $_.displayName$MailboxStat = Get-MailboxStatistics -identity $_.displayName Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaultsAdd-Member -InputObject $_ noteProperty WarningQuota $MailboxInfo.IssueWarningQuotaAdd-Member -InputObject $_ noteProperty SendQuota $MailboxInfo.ProhibitSendQuotaAdd-Member -InputObject $_ noteProperty SendRecieveQutoa $MailboxInfo.ProhibitSendReceiveQuotaAdd-Member -InputObject $_ noteProperty QuotaStatus $MailboxStat.StorageLimitStatus Add-Member -InputObject $_ noteProperty TotalItems $MailboxStat.ItemCountAdd-Member -InputObject $_ noteProperty TotalSizeMB $MailboxStat.TotalItemSize.Value.ToMB()Add-Member -InputObject $_ noteProperty DeleteItems $MailboxStat.DeletedItemCountAdd-Member -InputObject $_ noteProperty DeletedSizeMB $MailboxStat.TotalDeletedItemSize.Value.ToMB() -PassThru } | Export-Csv -Path D:\MailboxSize.csv
Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2009 2:43pm

Leave it to MS to make admin more difficult. What I need to do is move the largest mailboxes from my Exchange 2003 server to a store on my new Exchange 2007 server. I just want to sort by mailbox size so I can separate the current mailboxes into two different stores on the new system. Do I seriously have to learn Powershell scripting just to get what used to be a very simple task accomplished? I have too much on my plate right now and don't have the time, or frankly, the desire to learn PS. There has to be a better way. Does anybody know what it is?
May 29th, 2009 1:43am

well, does anyone?
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2009 2:48pm

Dont you love it when it seems like a doomsday virus has wiped out the rest of the human race?I'd like to know too.
August 13th, 2009 12:28am

Dovilla, whatsysYou should really start a new question, as the original question has been answered correctly multiple times.You don't indicate what it is you want to know.Karl
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2009 12:37am

Here's my contribution. I wrote this script to include some additional information in the Mailbox size report: Get-User -ResultSize Unlimited | Where {$_.RecipientType -eq "UserMailbox"} | Select DisplayName, Company, City | foreach { $MailboxInfo = Get-Mailbox -identity $_.displayName $MailboxStat = Get-MailboxStatistics -identity $_.displayName Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaults Add-Member -InputObject $_ noteProperty WarningQuota $MailboxInfo.IssueWarningQuota Add-Member -InputObject $_ noteProperty SendQuota $MailboxInfo.ProhibitSendQuota Add-Member -InputObject $_ noteProperty SendRecieveQutoa $MailboxInfo.ProhibitSendReceiveQuota Add-Member -InputObject $_ noteProperty QuotaStatus $MailboxStat.StorageLimitStatus Add-Member -InputObject $_ noteProperty TotalItems $MailboxStat.ItemCount Add-Member -InputObject $_ noteProperty TotalSizeMB $MailboxStat.TotalItemSize.Value.ToMB() Add-Member -InputObject $_ noteProperty DeleteItems $MailboxStat.DeletedItemCount Add-Member -InputObject $_ noteProperty DeletedSizeMB $MailboxStat.TotalDeletedItemSize.Value.ToMB() -PassThru } | Export-Csv -Path D:\MailboxSize.csv Hope this thread is still live!? Hi Aldermo - I think your script works great. Only thing missing for me is that I'd like a column for the Exchange ALIAS. Do you know how to incorporate this into your script? Thanks -- LL
December 15th, 2009 1:59pm

Hope this thread is still live!? Hi Aldermo - I think your script works great. Only thing missing for me is that I'd like a column for the Exchange ALIAS. Do you know how to incorporate this into your script? Thanks -- LL
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2009 2:00pm

Hope this thread is still live!?Hi Aldermo - I think your script works great. Only thing missing for me is that I'd like a column for the Exchange ALIAS. Do you know how to incorporate this into your script?Thanks -- LL Hi,Simply complete the first section with the line marked with bold to include the mailbox alias:Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaultsAdd-Member -InputObject $_ noteProperty WarningQuota $MailboxInfo.IssueWarningQuotaAdd-Member -InputObject $_ noteProperty SendQuota $MailboxInfo.ProhibitSendQuotaAdd-Member -InputObject $_ noteProperty SendRecieveQutoa $MailboxInfo.ProhibitSendReceiveQuotaAdd-Member -InputObject $_ notePropertyMBAlias $MailboxInfo.AliasBest Regards,Henrik
December 15th, 2009 2:30pm

Thanks so much for the quick response - it's worked a treat! I thought this thread was dead so I posted another post in the forum - but I'll go kill that off now. Thanks again H! L
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2009 2:38pm

Aldermo your script works great, thanks man. You saved me some time. SG
January 29th, 2010 3:45am

Aldermo,No doubt, the script is gr8.We are having multiple smtp domains, how can i get the Primary SmTP address of the users in the above script.RegardsSupreet Singh
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 12:21am

You could try the following to get the SMTP Address. It works in our enviroment. Add-Member -InputObject $_ noteProperty MBEmail $MailboxInfo.WindowsEmailAddress Put it right below the "Alias" line. Best Regards,Henrik Aldermo
March 8th, 2010 11:48am

Hi Aldermo, The script works great in lab, where we have only E2K7 machines. While in production we have E2K3 and E2K7 mixed environment. This is where it starts throwing error messages; "The specified mailbox "username" does not exist in an exchange 2007 mailbox Database." Can you advise any workaround for this ? Thanks
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2010 10:27pm

Hi, Note: the post which i replied to has been deleted by the poster, so plz some one unpropose it as asnwer. Plz use it Get-MailboxStatistics -Database "Mailbox Database (A to F)" | Select DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label="Size(MB)"} | Export-Csv c:\export\af.csv -NoTypeInformation instead of format-table use Select and also append -NoTypeInformation. Regards, Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
April 9th, 2010 3:03pm

Ok, I am sorry for asking this question, but I assume one would run this script in the Exchange Management Shell? If so, it is not working for me. I am starting the EMS and then just copying and pasting your script above and yet no CSV file for me to look at. I know I am doing something stupid so just let me know what I am doing wrong. Thanks.
Free Windows Admin Tool Kit Click here and download it now
August 9th, 2010 4:55am

No problem. Forums are for asking questions! :-) You should save the script to a .ps1-file, like "MBExport.ps1". Then execute it from the EMS with .\MBExport.ps1.
August 9th, 2010 4:09pm

Hello, First question for me, what is EMS? I also had a problem running a simple Get-MailboxStatistics in the powerShell window. I also just want to find the size of all mailboxes so that I know to contact users before they hit the limit as a few are doing this every week. Thanks.
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2010 5:26pm

EMS = Exchange Management Shell (Powershell) Open EMS using run as administrator. Run get-mailboxstatistics -server <ExchangeServerHostName> Note: Remove < and > when you enter the hostname of the Exchange Server. To see more examples run Get-help get-mailboxstatistics -examples -- Regards, Vik Singh -------------------------------------------------------------------------------- Please remember to click ??Mark as Answer? on the post that helps you, and to click ??Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. "Julian_KA" wrote in message news:6cf4afd0-b767-44b8-8645-4c7f65470ac9@communitybridge.codeplex.com... Hello, First question for me, what is EMS? I also had a problem running a simple Get-MailboxStatistics in the powerShell window. I also just want to find the size of all mailboxes so that I know to contact users before they hit the limit as a few are doing this every week. Thanks.
October 10th, 2010 7:15pm

Hi, I followed your document and it worked as well, but I am not able to export it in csv file as your document explained.. How do I get all info in XLS or TXT or CSV in readable format. Regards SunilIT Guy
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2011 4:02pm

Sunil; Which script are you running? Karlhttp://unlockpowershell.wordpress.com -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
January 12th, 2011 5:58pm

Hi, I using script: Get-MailboxStatistics -Database “Mailbox Database” | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime | Export-Csv MailboxSize.csv As I have more than 400 hundred users and I need the list with mailbox size. Regards SunilIT Guy
Free Windows Admin Tool Kit Click here and download it now
January 15th, 2011 11:07am

Thanks for the info, did the trick great!
January 16th, 2011 9:01am

Sunil; Never use a Format- cmdlet before sending data to Export-Csv Use Select-Object instead. PowerShell V1: Get-MailboxStatistics -Database "Mailbox Database" |Select-Object DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=Size(MB)}, LastLogonTime, LastLogoffTime | Export-Csv MailboxSize.csv -NoTypeInformation PowerShell V2: $MailboxStatistics = @{ Database = "Mailbox Database" } $Select = @{ Property = "DisplayName","LastLoggedOnUserAccount","ItemCount", @{expression={$_.totalitemsize.value.ToMB()};label=Size(MB)}, "LastLogonTime","LastLogoffTime" } $Csv = @{ Path = "MailboxSize.csv" NoTypeInformation = $true } Get-MailboxStatistics @MailboxStatistics |Select-Object @Select |Export-Csv @Csv Karlhttp://unlockpowershell.wordpress.com -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
Free Windows Admin Tool Kit Click here and download it now
January 18th, 2011 7:32pm

worked for me!
May 17th, 2011 12:55am

I ran the following.. Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount But it only listed about half my users. Do I have to go run this on every mailbox server? How can i run this from one server and get my whole organization?
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 11:52pm

Hi, You would have to pass each of the mailbox server to get-mailboxStatistics command like this Get-MailboxServer| Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},ItemCount It would return all of your mailboxes' stats. Regards,Laeeq Qazi|Team Lead(Exchange + Sharepoint + BES + DynamicsCRM) www.HostingController.com
June 8th, 2011 11:25am

Dear Aldermo - I like this script so much. Can you 2 more column, "last login user" and "active/online users. Many thanks ~r
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2011 11:42am

Not sure what you mean about "active/online users"? I'd modify Aldermo's script as follows: Get-User -ResultSize Unlimited -Filter 'RecipientType -eq "UserMailbox"' | Select DisplayName, Company, City | foreach { $MailboxInfo = Get-Mailbox -identity $_.displayName $MailboxStat = Get-MailboxStatistics -identity $_.displayName Add-Member -InputObject $_ noteProperty UseDefault $MailboxInfo.UseDatabaseQuotaDefaults Add-Member -InputObject $_ noteProperty WarningQuota $MailboxInfo.IssueWarningQuota Add-Member -InputObject $_ noteProperty SendQuota $MailboxInfo.ProhibitSendQuota Add-Member -InputObject $_ noteProperty SendRecieveQutoa $MailboxInfo.ProhibitSendReceiveQuota Add-Member -InputObject $_ noteProperty MBAlias $MailboxInfo.Alias Add-Member -InputObject $_ noteProperty QuotaStatus $MailboxStat.StorageLimitStatus Add-Member -InputObject $_ noteProperty TotalItems $MailboxStat.ItemCount Add-Member -InputObject $_ noteProperty TotalSizeMB $MailboxStat.TotalItemSize.Value.ToMB() Add-Member -InputObject $_ noteProperty DeleteItems $MailboxStat.DeletedItemCount Add-Member -InputObject $_ noteProperty DeletedSizeMB $MailboxStat.TotalDeletedItemSize.Value.ToMB() Add-Member -InputObject $_ noteProperty LastLoginUser $MailboxStat.LastLoggedOnUserAccount -PassThru } | Export-Csv -Path D:\MailboxSize.csv -NoTypeInformation Once you explain the "active/online users", perhaps we can add that as well. Notice my use of -Filter on the first line - that is much faster than the |Where from the original code. See my blog post "Use the -Filter, Luke" for more information on that. Karlhttp://unlockpowershell.wordpress.com Co-Author, Windows PowerShell 2.0 Bible -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
July 1st, 2011 5:34pm

Hello Karl, I need your help. The exchange policy for mailbox in my company is 1GB per user. So I need to know who are the users below 1GB. Can you please provide me with a script/command for users who are below 1GB in mailbox size so I can help the technical support here in upgrading these users mailbox capacity. Please send me an email on bmoussa84@gmail.com
Free Windows Admin Tool Kit Click here and download it now
July 5th, 2011 11:20am

Try this: Get-Mailbox -Filter {ProhibitSendQuota -notlike 1048576 -and UseDatabaseQuotaDefaults -eq $false} Karl http://unlockpowershell.wordpress.com Co-Author, Windows PowerShell 2.0 Bible -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
July 21st, 2011 4:56pm

Ok , well i must be the random one out of everyone here. All the scripts above have come in really handy. is there any way of storing the mailbox size into a variable. i want to write a script so that when users ask to increase their mailbox limit i can just run that and it will increment the size of the mailbox by 100 MB. i think i know how to do the incremental bit i just cant see how to get the 'current' mailbox size into a variable. any help would be greatly appreciated. thanks
Free Windows Admin Tool Kit Click here and download it now
July 22nd, 2011 1:13pm

On Fri, 22 Jul 2011 17:13:27 +0000, Nickda_corfu wrote: > > >Ok , well i must be the random one out of everyone here. All the scripts above have come in really handy. is there any way of storing the mailbox size into a variable. i want to write a script so that when users ask to increase their mailbox limit i can just run that and it will increment the size of the mailbox by 100 MB. i think i know how to do the incremental bit i just cant see how to get the 'current' mailbox size into a variable. any help would be greatly appreciated. This is an example of how you can do that: get-mailbox <user> | get-mailboxstatistics | foreach { $s=$_.totalitemsize.value.tostring();$s = + 100MB; $s = [int]($s/1KB); set-mailbox $_.legacyDN -ProhibitSendReceiveQuota ($s + "KB")} --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
July 22nd, 2011 6:16pm

Great, thanks a lot
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2011 2:45pm

On Fri, 22 Jul 2011 22:16:06 +0000, Rich Matheisen [MVP] wrote: >On Fri, 22 Jul 2011 17:13:27 +0000, Nickda_corfu wrote: > > >Ok , well i must be the random one out of everyone here. All the scripts above have come in really handy. is there any way of storing the mailbox size into a variable. i want to write a script so that when users ask to increase their mailbox limit i can just run that and it will increment the size of the mailbox by 100 MB. i think i know how to do the incremental bit i just cant see how to get the 'current' mailbox size into a variable. any help would be greatly appreciated. This is an example of how you can do that: get-mailbox <user> | get-mailboxstatistics | foreach { $s=$_.totalitemsize.value.tostring();$s = + 100MB; $s = [int]($s/1KB); set-mailbox $_.legacyDN -ProhibitSendReceiveQuota ($s + "KB")} --- Rich Matheisen MCSE+I, Exchange MVP Oops! That "$s = + 100MB" should have been "$s += 100MB". Sometimes my fingers and brain lose synchronization. :-( --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
July 23rd, 2011 5:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics