Move Mailboxdatabase and other logs to different drive in Exchange 2013/2016

Published on
3,097 Points
Last Modified:
Exchange Server, Windows Server, Active Directory, Virtualization, Skype for Business Expert.
This article explains how to move an Exchange 2013/2016 mailbox database and logs to a different drive.

When Exchange Server 2016/2013 installation is completed it creates a database on the server. If you installed Exchange to the default path then the mailbox will be stored in C:\Program Files\Microsoft\Exchange Server\V15\Mailbox.

To get the details of the current location please use the below command.

Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

The default location can create problems in future if your server HDD is not properly sized. Another common scenario is that the database will grow and the current volume ends up being too low on free disk space, so you'll need to move it to a new, larger volume. It is always recommended to have database and logs on different drives other than OS drive. So you would likely want to move this database to the volumes that you've provisioned for your Exchange database and log files. 

Before you proceed, consider that the move requires the database to be dismounted and taken offline, so it will not be accessible to your mailbox users during the move. This is fine if the server has just been set up and there are no mailboxes on it, but if you're moving a database with active mailbox users, a better option would be to create a new database on the new volume and perform the mailbox moves which means zero downtime. The command shown below will help you move to a different database in bulk.

Get-Mailbox -Database “Source Database Name” " -ResultSize Unlimited | New-MoveRequest -TargetDatabase “Target Database Name”

Do not forget to clear the move request once all move requests are completed. You can check the move request status by using the command below 


The next command will remove all completed move requests.

Get-MoveRequest | where {$_.status -eq “Completed”} | Remove-MoveRequest

Before I move the database, I am first going to rename it. The uniquely generated name of “Mailbox Database 0430860505” is not desirable so I will rename it to “MailboxDatabase-01” instead.

Set-MailboxDatabase "Mailbox Database 0430860505" -Name "MailboxDatabase-01"

This is the command to move the mailbox database to another drive and rename the EDB file name while moving.

Move-DatabasePath MailboxDatabase-01 -EdbFilePath D:\Mailboxdatabases\MailboxDatabase-01.edb -LogFolderPath E:\Logs\MailboxDatabase-01

The database will be temporarily dismounted, the files are copied to the new locations, and then the database is mounted again. The time this operation takes will depend on the size of the database and size of the logs, as well as the speed of the source and destination disks. 

Generally speaking, the more data you have the longer it will take, In short, a very long outage for your users if your database is big, hence why I recommend considering moving mailboxes to a new database instead.

We are now done with the mailbox database and its logs movement.

Now there are cases where C drive space is used because of connectivity logs, Message tracing logs and IIS logs.

You can change this from the GUI. Go to Servers-->Click Server name and click Edit/pencil button--> Transport logs.

See the following Screenshot.

We are now set with the transport log location.

Now next chance for logs is IIS logs i.e. C:\inetpub

You can change the location from IIS as below. 

Default Website

Here you can use either the browse button or type the desired path manually.

Click on Apply.

Exchange Backend

Here you can use either the browse button or type the desired path manually.

Click on Apply.

We have now moved mailboxdatabase, Databaselogs, Transport logs and IIS logs to a different drive.

Need more support on this topic? 

You are encouraged to use the "Ask a Question" feature of Experts Exchange to ask for more help. I monitor asked questions at EE in an expert capacity and will be glad to offer additional assistance, as will many other experts on this topic.

Thanks for reading my article.

Author:MAS (MVE)

Featured Post

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.

Join & Write a Comment

Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month