Book Image

Microsoft Exchange Server PowerShell Cookbook

Book Image

Microsoft Exchange Server PowerShell Cookbook

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Managing the mailbox databases


The Exchange Management Shell provides a set of cmdlets for mailbox database management. In this recipe, we will take a look at how you can use these cmdlets to create, change, or delete mailbox databases. We will also take a look at how the automatic mailbox distribution works.

How to do it...

The process for managing mailbox databases is pretty straightforward. We'll start with creating a new mailbox database:

  1. To create a mailbox database, use the New-MailboxDatabase cmdlet, as shown in the following example:

    New-MailboxDatabase -Name DB4 `
    -EdbFilePath E:\Databases\DB4\Database\DB4.edb `
    -LogFolderPath E:\Databases\DB4\Logs `
    -Server EX01
    
  2. You can mount the database after it has been created using the Mount-Database cmdlet:

    Mount-Database -Identity DB4
    
  3. The name of a database can be changed using the Set-MailboxDatabase cmdlet:

    Set-MailboxDatabase -Identity DB4 -Name Database4
    
  4. Finally, you can remove a mailbox database using the Remove-MailboxDatabase cmdlet...