Commands › Exchange Online

New-MailboxDatabase

Exchange Online ExchangeOnlineManagement New-*

Create a mailbox database, or a recovery database. Each database you create must have a unique name in the organization.

Quick start script

# New-MailboxDatabase — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-MailboxDatabase
$before | Format-List

# 3. Make the change (dry run first)
New-MailboxDatabase -Name <String> -Recovery <SwitchParameter> -Server <ServerIdParameter> -WhatIf
New-MailboxDatabase -Name <String> -Recovery <SwitchParameter> -Server <ServerIdParameter>

# 4. Verify and diff
$after = Get-MailboxDatabase
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax — 2 parameter sets

NonRecovery

New-MailboxDatabase [-Name] <String> -Server <ServerIdParameter>
 [-AutoDagExcludeFromMonitoring <Boolean>]
 [-IsExcludedFromProvisioning <Boolean>]
 [-IsExcludedFromInitialProvisioning]
 [-IsSuspendedFromProvisioning <Boolean>]
 [-OfflineAddressBook <OfflineAddressBookIdParameter>]
 [-PublicFolderDatabase <DatabaseIdParameter>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-EdbFilePath <EdbFilePath>]
 [-LogFolderPath <NonRootLocalLongFullPath>]
 [-SkipDatabaseLogFolderCreation]
 [-WhatIf]
 [<CommonParameters>]

Recovery

New-MailboxDatabase [[-Name] <String>] -Server <ServerIdParameter>
 [-Recovery]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-EdbFilePath <EdbFilePath>]
 [-LogFolderPath <NonRootLocalLongFullPath>]
 [-SkipDatabaseLogFolderCreation]
 [-WhatIf]
 [<CommonParameters>]

Parameters (15)

ParameterTypeRequiredWhat it controls
-Name String yes The Name parameter specifies the name of the new mailbox database. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").
-Recovery SwitchParameter yes The Recovery switch specifies that the new database is designated as a recovery database. You don't need to specify a value with this switch.
-Server ServerIdParameter yes The Server parameter specifies the Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-AutoDagExcludeFromMonitoring Boolean The AutoDagExcludeFromMonitoring parameter specifies that the database being created should not be monitored by managed availability.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-EdbFilePath EdbFilePath The EdbFilePath parameter specifies the path to the database files. The default location is `%ExchangeInstallPath%Mailbox\<Mailbox DB Name>\<Mailbox DB Name>.edb`.
-IsExcludedFromInitialProvisioning SwitchParameter The IsExcludedFromInitialProvisioning switch specifies that this database is temporarily not considered by the mailbox provisioning load balancer. You don't need to specify a value with this switch.
-IsExcludedFromProvisioning Boolean The IsExcludedFromProvisioning parameter specifies whether this database is considered by the mailbox provisioning load balancer. If the IsExcludedFromProvisioning parameter is set to $true, no new mailboxes are...
-IsSuspendedFromProvisioning Boolean The IsSuspendedFromProvisioning parameter specifies whether this database is temporarily considered by the mailbox provisioning load balancer.
-LogFolderPath NonRootLocalLongFullPath The LogFolderPath parameter specifies the folder location for log files.The default location is `%ExchangeInstallPath%Mailbox\<Mailbox DB Name>`
-OfflineAddressBook OfflineAddressBookIdParameter The OfflineAddressBook parameter specifies the associated offline address book (OAB) for the new mailbox database.
-PublicFolderDatabase DatabaseIdParameter The PublicFolderDatabase parameter specifies the associated public folder database for the new mailbox database. You can use any value that uniquely identifies the public folder database. For example:
-SkipDatabaseLogFolderCreation SwitchParameter This parameter is reserved for internal Microsoft use.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.