O'Reilly logo

Microsoft Exchange 2010 PowerShell Cookbook by Mike Pfeiffer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving databases and logs to another location

As your environment grows or changes over time, it may be necessary to move one or more databases and their log streams to another location. Like most things, this change can be performed through the Exchange Management Console, but performing this task within the shell gives you some more flexibility. In this recipe, you will learn how to move database and log files to another location.

How to do it...

To move the database file and log stream for the DB1 database to a new location, use the following command syntax:

Move-DatabasePath -Identity DB1 `
-EdbFilePath E:\Databases\DB1\DB1.edb `
-LogFolderPath E:\Databases\DB1 `
-Confirm:$false `
-Force

After executing the preceding command, the DB1 database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required