Exchange 2010 : Get-MailboxStatistics / historical data ?!?
jibbajabba
Member Posts: 4,317 ■■■■■■■■□□
in Off-Topic
When running the following command
I notice that it shows disabled / removed / moved mailboxes, which is a bit confusing.
Comparing "Get-MailboxStatistics" with "Get-MailboxDatabase -identity "Database 123" | Get-Mailbox" shows a discrepancy of over 100 mailboxes.
I cannot find any information that MailboxStatistics shows historical data. Can someone shed some light on this ?
Get-MailboxStatistics -database "Database 123" | select DisplayName, TotalItemSize, LastLogonTime | Sort-Object TotalItemSize
I notice that it shows disabled / removed / moved mailboxes, which is a bit confusing.
Comparing "Get-MailboxStatistics" with "Get-MailboxDatabase -identity "Database 123" | Get-Mailbox" shows a discrepancy of over 100 mailboxes.
I cannot find any information that MailboxStatistics shows historical data. Can someone shed some light on this ?
My own knowledge base made public: http://open902.com
Comments
-
Claymoore Member Posts: 1,637Get-mailboxstatistics will return disconnected mailboxes and mailboxes that have been moved, in addition to active mailboxes. You can run separate reports to isolate the disconnected or moved mailboxes or ignore them in your command.
Get-MailboxStatistics -database "Database 123" | [COLOR=#ff0000]where {$_.DisconnetDate -eq $null}[/COLOR] | select DisplayName, TotalItemSize, LastLogonTime | Sort-Object TotalItemSize
Get-MailboxStatistics: Exchange 2010 Help
You may also like this command that I use to get a report on mailbox sizes:Get-Mailbox -ResultSize unlimited | Get-MailboxStatistics | select-object DisplayName,ItemCount,@{Name="TotalItemSize(MB)";Expression={$_.TotalItemSize.Value.ToMB()}},Database | Export-Csv c:\Download\Scripts\Output\Mailboxsize.csv
Or a replacement for the Exchange server Profile Analyzer:
User Profile Analysis for Exchange Server 2010 (Who needs the Exchange Profile Analyzer?) - Neil Johnson - a rock 'n roll nerd.... - Site Home - TechNet Blogs -
jibbajabba Member Posts: 4,317 ■■■■■■■■□□How the heck did I miss that on the Microshaft page .. I swear I been there
Thanks buddy
Re:Size - yea, doing something similar.
Don't you like when you run out of space and you got 250GB DBs with over half that white spaceMy own knowledge base made public: http://open902.com -
Claymoore Member Posts: 1,637I had a client recently who set the Deleted Items retention on their databases to 180 days, not knowing how that would impact their storage. That's a lot of unaccounted space with that hidden 30 GB quota on the Recoverable Items folder. At least we can spin up new databases and move the mailboxes live instead of having to take the databases offline. Eseutil isn't recommended to be run against a DAG protected database, and I wouldn't want to take an entire database offline for the day it would take to compact a 250 GB database.How can I reclaim the whitespace?
Naturally, after seeing the available whitespace in the database, the question that always ensues is – how can I reclaim the whitespace?
Many assume the answer is to perform an offline defragmentation of the database using ESEUTIL. However, that's not our recommendation. When you perform an offline defragmentation you create an entirely brand new database and the operations performed to create this new database are not logged in transaction logs. The new database also has a new database signature, which means that you invalidate the database copies associated with this database.
In the event that you do encounter a database that has significant whitespace and you don't expect that normal operations will reclaim it, our recommendation is:- Create a new database and associated database copies.
- Move all mailboxes to the new database.
- Delete the original database and its associated database copies.
-
jibbajabba Member Posts: 4,317 ■■■■■■■■□□Thanks, I do know all about Whitespace
Working with Exchange 2010 for ages now - but some little bits are sometimes still a mystery ...
But yea - currently writing scripts to send daily reports about whitespace .. Had to find out that only one database can be emptied as all the other ones are too large for the available disk space.
Can't believe that nowadays disk space is still number 1 of admin's pain ..
That Server doesn't even have a DAG but all DAS - which is fine .. but in this instance mailboxes NEVER got disabled when the user were, so some user have 1M+ emails in there because they keep receiving mails even though they left the company 10 years ago ..
Ah well .. back to my move request batches ..My own knowledge base made public: http://open902.com -
Claymoore Member Posts: 1,637jibbajabba wrote: ».. but in this instance mailboxes NEVER got disabled when the user were, so some user have 1M+ emails in there because they keep receiving mails even though they left the company 10 years ago.
Wow. I can understand keeping a mailbox around for a while to make sure no client correspondence is missed, but 10 years?
I was discussing this with a client a few weeks ago whom we are migrating to Office 365. The next wave of Office 365 introduces an Inactive Mailbox - a deleted mailbox on litigation hold - that doesn't require a license. That beats having to migrate the user back on-prem and then managing that storage for the next 7 years or so.
Manage Inactive Mailboxes in Exchange Online: Exchange Online Help