What to do when your transaction log drive is full (using Powershell)
I recently had to resolve an issue where backups had paused, causing our transaction log drive to fill up on Exchange. Obviously this happened just as I was about to leave on a Friday afternoon!
First things first… DO NOT DELETE ANY TRANSACTION LOGS!!! if you do, the databases will more than likely not mount. Very Very important!!
The guide assumes that your log drive is 100% full, your databases have dismounted and you feel like pulling your hair out.
First, make sure your databases are dismounted. You can check this in the failover cluster manager (if its a clustered mailbox server), in the exchange management tools GUI or using Powershell on the mailbox server.
Get-Mailboxdatabase -status | where {$_.Mounted -eq $true}
(will tell you what databases are mounted)
Get-Mailboxdatabase -status | where {$_.Mounted -eq $false}
(will tell you if the database is dismounted)
Once you’ve ensured your exchange database is dismounted you can do one of two things. Either move the logs yourself to a new location, or let the exchange powershell cmdlet do it for you.
I personally prefer to move the logs myself so I can see the progress but its up to you.If youve moved the logs yourself, run the following after they’ve moved:
move-storagegrouppath -identity SERVERNAME\STORAGEGROUPNAME”-LogFolderPath X:\NEWLOGPATH -ConfigurationOnly
If you want the powershell cmdlet to move them for you, run this command instead:
move-storagegrouppath -identity SERVERNAME\STORAGEGROUPNAME” -LogFolderPath X:\NEWLOGPATH
Once the commands are complete, you can mount the database again and all should be well.
If you have transaction logs and mailbox databases on the same drive
If for some crazy reason you have your transaction logs and your mailbox databases on the same drive, you might opt to move the database rather than the logs (due to how much space you have available in the new location)
Obviously you need the databases dismounted for this as well, either in cluster manager, the gui or using powershell (as above).
For this, I do prefer to let powershell move the database (edb file) . The progress bar doesnt tend to reflect how far the copy has got, so dont worry if it doesnt move. I use resouce monitor to make sure the disk activity is active between the source and destination.
To initiate the database move (powershell will move the database for you):
Move-DatabasePath -identity “MAILSERVER\STORAGEGROUP\DATABASE” -EdbFilePath “X:\NewLocation\Database.edb”
If you want me to go over anything else, please leave a comment.

