Share via


New-MailboxDatabase

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Use the New-MailboxDatabase cmdlet to create a mailbox database object in the Storage Group container under the specified server object.

Syntax

New-MailboxDatabase -Name <String> -StorageGroup <StorageGroupIdParameter> [-Confirm [<SwitchParameter>]] [-CopyEdbFilePath <EdbFilePath>] [-DomainController <Fqdn>] [-EdbFilePath <EdbFilePath>] [-HasLocalCopy <$true | $false>] [-OfflineAddressBook <OfflineAddressBookIdParameter>] [-PublicFolderDatabase <DatabaseIdParameter>] [-TemplateInstance <PSObject>] [-WhatIf [<SwitchParameter>]]

New-MailboxDatabase [-Name <String>] -MailboxDatabaseToRecover <DatabaseIdParameter> -StorageGroup <StorageGroupIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-EdbFilePath <EdbFilePath>] [-TemplateInstance <PSObject>] [-WhatIf [<SwitchParameter>]]

Detailed Description

To run the New-MailboxDatabase cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

MailboxDatabaseToRecover

Required

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

The MailboxDatabaseToRecover parameter specifies the mailbox database that you want to recover to the new database. This parameter is only required if you are recovering a mailbox database.

Name

Required

System.String

The Name parameter specifies the name of the new mailbox database.

StorageGroup

Required

Microsoft.Exchange.Configuration.Tasks.StorageGroupIdParameter

The StorageGroup parameter specifies the name of the storage group where the mailbox database will be created.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You do not have to specify a value with the Confirm parameter.

CopyEdbFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The CopyEdbFilePath parameter specifies the path to the copy of the .edb file. The default value is %programfiles%\Microsoft\Exchange Server\LocalCopies\<Storage Group name>\<Database name>.edb.

If specified, the HasLocalCopy parameter must be set to $true.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that retrieves data from the Active Directory directory service, include the DomainController parameter in the command.

EdbFilePath

Optional

Microsoft.Exchange.Data.EdbFilePath

The EdbFilePath parameter specifies the path to the .edb file. The default value is %programfiles%\Microsoft\Exchange Server\Mailbox\<Storage Group name>\<Database name>.edb.

HasLocalCopy

Optional

System.Boolean

The HasLocalCopy parameter specifies whether a copy of the database will be created at the location specified in the CopyEdbFilePath parameter. The two possible values for this parameter are $true or $false.

Note

Cluster continuous replication (CCR) and local continuous replication (LCR) allow only one database per storage group. If you specify the CopyEdbFilePath parameter as $true, you must create the new mailbox database on a storage group that does not already have a database.

OfflineAddressBook

Optional

Microsoft.Exchange.Configuration.Tasks.OfflineAddressBookIdParameter

The OfflineAddressBook parameter specifies the associated address book for the new mailbox database.

PublicFolderDatabase

Optional

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

The PublicFolderDatabase parameter specifies the associated public folder database for the new mailbox database.

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to the TemplateInstance parameter, the command will use that object's configuration to create an exact duplicate of the object on a local or target server. For more information, see Templates.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You do not have to specify a value with the WhatIf parameter.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

The following example shows how to create a new mailbox database named MailboxDatabase01 in the storage group named First Storage Group on the mailbox server named Server01.contoso.com. This example specifies where to create the .edb database file.

New-MailboxDatabase -StorageGroup "Server01.contoso.com\First Storage Group" -Name "MailboxDatabase01" -EdbFilePath D:\DatabaseFiles\MailboxDatabase01.edb