Shrink Exchange Databases

Environment: Exchange 2013

I am looking for the PowerShell command to determine how much whitespace is in an Exchange 2013 database.  I'm also wondering what the steps are to get the whitespace back.  If I recall correctly, I have to:
Dismount the database
Run a specific command
Wait until complete
Remount the database

Thank you!
zito2000Network ManagerAsked:
Who is Participating?
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.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Yes, the approach you are referring is the offline Defragmentation method..
But before that, recommend you to check how much white space is currently available and if significant white space is available then do the manual way of removing white spaces.
More info on how to check the white space availability and how to remove it here:
https://www.nucleustechnologies.com/blog/how-to-remove-white-spaces-in-exchange-database/

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
austin minorCommented:
I hope the above suggestion clarifies your concern. Additionally, you may also get help from below articles:

How to Fix – Exchange Database (.EDB file) size grown too big
https://expert-advice.org/exchange-server/how-to-reduce-exchange-edb-file-size/

Also, please check this article which will help you understanding the puzzling mathematics of white space in Exchange Database: https://www.lepide.com/blog/the-puzzling-mathematics-of-white-space-in-exchange-database/
zito2000Network ManagerAuthor Commented:
Thank you both.  Exactly what I needed!
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Welcome, glad to assist!!
zito2000Network ManagerAuthor Commented:
I had another question...
Since these are in a DAG group, there are essentially two database files on two separate servers. Do I need to do the defrag on both servers independently?
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> Do I need to do the defrag on both servers independently?

No, you can just reseed the changes to the other database Servers in DAG.
If you have DAG, then it is advisable not to perform offline defragmentation of your exchange database as it would break the continuous availability..
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
Powershell

From novice to tech pro — start learning today.