Exchange 2007 Beta 2 is now available and the biggest change is in the management. The entire management of Exchange 2007 can be done using PowerShell (aka MSH). Learning the commands has been made easy as well and as a bonus, we'll see how to move the mailbox database in Exchange 2007!
The Exchange Management Console (EMC) has been built on top of PowerShell, and every task you do in the GUI can be done with PowerShell as well. Learning the commands couldn't be easier, when you perform a task in the GUI, once it is complete it will show you the command that was used. In this example I have moved the database files from the default location to a folder on the S: drive called Database. You can see the MSH command that was executed.
If we cut and paste that into the Management Shell we should get the same outcome. As a bonus, pressing CTRL+C will copy the command (as well as some other text) and you can paste it into Notepad for editing. I have changed the EDBFilePath to put the database on Q:\Data.
Because this task needs to dismount the Store, you will be prmoted to accept this. You get a similar prompt when you use the GUI.
Once you accept the store will be dismounted, the database will be moved.
Now that should make scripting Exchange management a bit easier!.