Search For A Solution!

Total Pageviews

Friday, February 17, 2017

Mailbox Size (items size) smaller that actual database file size - Defrag can not shrinc database file

In case you have deleted or moved items out of the mailbox this space will be still taken (and not reported as white spate).

Defrag still provides same size as the original.

First you need to run below command in powershell to clean the dumpster/taken space.
It will delete ONLY dumpster files nothing of your actual emails

Search-Mailbox cape -searchdumpsteronly -deletecontent -confirm:$false -Force

Depending on the MB or GB to freed it will take some time once done it will report similar to below report

RunspaceId       : f4493be9-f615-4925-a12c-be81b6444d9c
Identity         : DOMAIN.int/ORG UNIT/MAILBOXNAME
DisplayName      : MyName, Company Name
TargetMailbox    :
TargetPSTFile    :
Success          : True
TargetFolder     :
ResultItemsCount : 111522
ResultItemsSize  : 14.3 GB (15,358,571,991 bytes)

Then you can run below command to see the available space to that mailbox (space can be recovered after DEFRAG -D)

Get-MailboxDatabase -Status | ft name,databasesize,availablenewmailboxspace -auto

Which will create report similar to below

Name             DatabaseSize                                    AvailableNewMailboxSpace
----                 ------------                                          ------------------------
DBNAME     75.13 GB (80,673,308,672 bytes)    10.45 GB (11,223,498,752 bytes)

Now you can Dismount your DB in question and defrag

For example:
eseutil /d "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\DBFOLDERNAME\DBNAME.edb"

Call2fixit

No comments:

Post a Comment