Will deleting unwanted mailbox in exchange 2007 free space on the Drive where Exchange database is Hosted


We have exchange 2007 server and the database is hosted on D drive. The total space on this drive is 379GB and now the free space available on this drive is only 27GB.

There are more than 100 mailboxes that are no more required (Mailbox of users who have left our organisation)

If I delete all these mail boxes that are not required, will I be able to reclaim space on the D drive.

I know to forcefully remove a single mailbox from exchange through the following command.
Is there a way to remove all the mailbox from exchange at one go.

List all disconnected mailboxes
Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

Removing a single mailbox
Remove-Mailbox -Database <Database-Name> -StoreMailboxIdentity <MailboxGuid> -confirm:$true

Your suggestions much appreciated.

Thanks in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Whatever you do, it will not free up space. When you disconnect a mailbox, nothing happens to the space, obviously. But when you delete a mailbox, still no space recovered. After a while (after retentions settings), the mailbox will free up WHITE space in the database. The file size will remain the same.
Only after a full database move, or a defrag, will the file size shrink.
HariomExchange ExpertsCommented:
If I delete all these mail boxes that are not required, will I be able to reclaim space on the D drive. ?

>>Nope , for this you need to first remove mailboxes using your command , then need to run online maintenance to check white space then need to schedule offline defrage after dismounting exchange database this will take more than 8 hours depends on database size and space to run offline defarge.

The best way is to create new database , move the mailboxes which required to new mailbox then you can deleted the exiting database , this will create free space on your d drive.
lianne143Author Commented:
Please post me some tutorials to do a defrag. With my existing space on D drive will I be able to run the defrag.
We have two database student and staff.
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Read this Microsoft article :


Please note the free space required should be at least 150% of the database you're defragging.
The defrag will surely fail if you don't have enough space for the temporary files that are created and needed.
Use a different extra hard disk if you don't have space to spare on the source disk. It will require extra command lines parameters, and you'll have to correctly move the database file after the defrag.
lianne143Author Commented:
Thanks Kimputer

Finally , I am thinking different ways to manage this server for another 10 months and looking to migrate to Windows 2013 server.

If I delete the unnecessary mailboxes , will the Veeam backup\Snapshot size and backup time of exchange get reduced.

Theoretically, yes. However, some backup solutions are a bit "dumb" and depend mostly on what Microsoft provides, and that could very well be a VSS snapshot of the whole database (which isn't the reduced size you wanted).
Because I didn't use Veeam, I can't be sure what method it uses.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.