TechNet
Export (0) Print
Expand All

Set-MailboxDatabase

 

Applies to: Exchange Server 2016

This cmdlet is available only in on-premises Exchange Server 2016.

Use the Set-MailboxDatabase cmdlet to configure a variety of properties for a mailbox database.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Set-MailboxDatabase -Identity <DatabaseIdParameter> [-AllowFileRestore <$true | $false>] [-AutoDagExcludeFromMonitoring <$true | $false>] [-AutoDatabaseMountDial <Lossless | GoodAvailability | BestAvailability>] [-BackgroundDatabaseMaintenance <$true | $false>] [-CafeEndpoints <String[]>] [-CalendarLoggingQuota <Unlimited>] [-CircularLoggingEnabled <$true | $false>] [-Confirm [<SwitchParameter>]] [-DatabaseGroup <String>] [-DataMoveReplicationConstraint <None | SecondCopy | SecondDatacenter | CINoReplication | CISecondCopy | CISecondDatacenter>] [-DeletedItemRetention <EnhancedTimeSpan>] [-DomainController <Fqdn>] [-EventHistoryRetentionPeriod <EnhancedTimeSpan>] [-IndexEnabled <$true | $false>] [-IsExcludedFromInitialProvisioning <$true | $false>] [-IsExcludedFromProvisioning <$true | $false>] [-IsExcludedFromProvisioningByOperator <$true | $false>] [-IsExcludedFromProvisioningDueToLogicalCorruption <$true | $false>] [-IsExcludedFromProvisioningReason <String>] [-IssueWarningQuota <Unlimited>] [-IsSuspendedFromProvisioning <$true | $false>] [-JournalRecipient <RecipientIdParameter>] [-MailboxLoadBalanceEnabled <$true | $false>] [-MailboxLoadBalanceMaximumEdbFileSize <ByteQuantifiedSize>] [-MailboxLoadBalanceOverloadedThreshold <Int32>] [-MailboxLoadBalanceRelativeLoadCapacity <Int32>] [-MailboxLoadBalanceUnderloadedThreshold <Int32>] [-MailboxProvisioningAttributes <MailboxProvisioningAttributes>] [-MailboxRetention <EnhancedTimeSpan>] [-MaintenanceSchedule <Schedule>] [-MountAtStartup <$true | $false>] [-Name <String>] [-OfflineAddressBook <OfflineAddressBookIdParameter>] [-ProhibitSendQuota <Unlimited>] [-ProhibitSendReceiveQuota <Unlimited>] [-PublicFolderDatabase <DatabaseIdParameter>] [-QuotaNotificationSchedule <Schedule>] [-RecoverableItemsQuota <Unlimited>] [-RecoverableItemsWarningQuota <Unlimited>] [-RetainDeletedItemsUntilBackup <$true | $false>] [-WhatIf [<SwitchParameter>]]

This example sets the length of time that deleted items are retained. If a specific mailbox has its own item retention set, that value is used instead of this value, which is set on the mailbox database.

Set-MailboxDatabase "Mailbox Database01" -DeletedItemRetention 7.00:00:00

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Mailbox Database Permissions" section in the Recipients Permissions topic.

 

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

The Identity parameter specifies the mailbox database that you want to modify. You can use any value that uniquely identifies the database. For example:

  • Name

  • Distinguished name (DN)

  • GUID

AllowFileRestore

Optional

System.Boolean

The AllowFileRestore parameter specifies whether to allow a database to be restored from a backup. Valid values are:

  • $true   You can replace an existing database with a newly-created database. You can mount a database that doesn't match the database entry in Active Directory.

  • $false   You can't replace an existing database with a newly-created database. You can't mount a database that doesn't match the database entry in Active Directory. This is the default value.

AutoDagExcludeFromMonitoring

Optional

System.Boolean

The AutoDagExcludedFromMonitoring parameter specifies whether to exclude the mailbox database from the ServerOneCopyMonitor, which alerts an administrator when a replicated database has only one healthy copy available. Valid values are:

  • $true   No alert is issued when there's only one healthy copy of the replicated database.

  • $false   An alert is issued when there's only one healthy copy of the replicated database. This is the default value.

AutoDatabaseMountDial

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.AutoDatabaseMountDial

This parameter is reserved for internal Microsoft use.

BackgroundDatabaseMaintenance

Optional

System.Boolean

The BackgroundDatabaseMaintenance parameter specifies whether the Extensible Storage Engine (ESE) performs database maintenance. Valid values are:

  • $true   The mailbox database reads the object during database mount and initializes the database to perform background maintenance. This is the default value.

  • $false   The mailbox database reads the object during database mount and initializes the database without the option to perform background maintenance.

CafeEndpoints

Optional

System.String[]

This parameter is reserved for internal Microsoft use.

CalendarLoggingQuota

Optional

Microsoft.Exchange.Data.Unlimited

The CalendarLoggingQuota parameter specifies the maximum size of the log in the Recoverable Items folder of the mailbox that stores changes to calendar items. When the log exceeds this size, calendar logging is disabled until messaging records management (MRM) removes older calendar logs to free up more space.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. The default value is 6 gigabytes (6442450944 bytes).

When you enter a value, qualify the value with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The value of this parameter must be less than or equal to the value of the RecoverableItemsQuota parameter.

This setting applies to all mailboxes in the database that don't have their own calendar logging quota configured.

CircularLoggingEnabled

Optional

System.Boolean

The CircularLoggingEnabled parameter specifies whether circular logging is enabled for the database. Valid values are:

  • $true   Circular logging is enabled.

  • $false   Circular logging is disabled. This is the default value.

For more information about circular logging, see Exchange Native Data Protection.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.

  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

DatabaseGroup

Optional

System.String

This parameter is reserved for internal Microsoft use.

DataMoveReplicationConstraint

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.DataMoveReplicationConstraintParameter

The DataMoveReplicationConstraint parameter specifies the throttling behavior for high availability mailbox moves. Valid values are:

  • None   Moves shouldn't be throttled to ensure high availability. Use this setting if the database isn't part of a database availability group (DAG).

  • SecondCopy   At least one passive mailbox database copy must have the most recent changes synchronized. This is the default value. Use this setting to indicate that the database is replicated to one or more mailbox database copies.

  • SecondDatacenter   At least one passive mailbox database copy in another Active Directory site must have the most recent changes replicated. Use this setting to indicate that the database is replicated to database copies in multiple Active Directory sites.

noteNote:
Any value other than None enables the Microsoft Exchange Mailbox Replication service to coordinate with Active Manager. For more information, see Active Manager.

DeletedItemRetention

Optional

Microsoft.Exchange.Data.EnhancedTimeSpan

The DeletedItemRetention parameter specifies the length of time to keep deleted items in the Recoverable Items\Deletions folder in mailboxes. Items are moved to this folder when the user deletes items from the Deleted Items folder, empties the Deleted Items folder, or deletes items by using Shift+Delete.

To specify a value, enter it as a time span: dd.hh:mm:ss where dd = days, hh = hours, mm = minutes, and ss = seconds.

Valid values are 00:00:00 to 24855.03:14:07. The default value is 14.00:00:00 (14 days).

This setting applies to all mailboxes in the database that don't have their own deleted item retention value configured.

For more information, see Recoverable Items folder.

DomainController

Optional

Microsoft.Exchange.Data.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 (FQDN). For example, dc01.contoso.com.

EventHistoryRetentionPeriod

Optional

Microsoft.Exchange.Data.EnhancedTimeSpan

The EventHistoryRetentionPeriod parameter specifies the length of time to keep event data. This event data is stored in the event history table in the Exchange store. It includes information about changes to various objects in the mailbox database. You can use this parameter to prevent the event history table from becoming too large and using too much disk space.

To specify a value, enter it as a time span: dd.hh:mm:ss where dd = days, hh = hours, mm = minutes, and ss = seconds.

Valid values are 00:00:01 to 30.00:00:00. The default value is 7.00:00:00 (7 days).

IndexEnabled

Optional

System.Boolean

The IndexEnabled parameter specifies whether Exchange Search indexes the mailbox database. Valid values are:

  • $true   Exchange Search indexes the mailbox database. This is the default value.

  • $false   Exchange Search doesn't index the mailbox database.

IsExcludedFromInitialProvisioning

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

IsExcludedFromProvisioning

Optional

System.Boolean

The IsExcludedFromProvisioning parameter specifies whether to exclude the database from the mailbox provisioning load balancer that distributes new mailboxes randomly and evenly across the available databases. Valid values are:

  • $true   The database is excluded from new or move mailbox operations when you don't specify the target mailbox database.

  • $false   The database can be used in new or move mailbox operations when you don't specify the target mailbox database. This is the default value.

The value is automatically set to $true when you set the IsExcludedFromProvisioningDueToLogicalCorruption parameter to $true, and isn't changed back to $false when you set the IsExcludedFromProvisioningDueToLogicalCorruption parameter back to $false. In the case of database corruption, you should set the IsExcludedFromProvisioning parameter back to $false only after you fix the corruption issue or recreate the database.

IsExcludedFromProvisioningByOperator

Optional

System.Boolean

The IIsExcludedFromProvisioningByOperator parameter specifies whether to exclude the database from the mailbox provisioning load balancer that distributes new mailboxes randomly and evenly across the available databases.

Valid values are:

  • $true

    • Indicates that you manually excluded the database. The database is excluded from new or move mailbox operations when you don't specify the target mailbox database.

    • You need to use the IsExcludedFromProvisioningReason parameter if the property isn't already populated.

    • The IsExcludedFromProvisioningBy property is populated with your user account.

  • $false   The database can be used in new or move mailbox operations when you don't specify the target mailbox database. This is the default value.

IsExcludedFromProvisioningDueToLogicalCorruption

Optional

System.Boolean

The IsExcludedFromProvisioningDueToLogicalCorruption parameter specifies whether to exclude the database from the mailbox provisioning load balancer that distributes new mailboxes randomly and evenly across the available databases.

Valid values are:

  • $true

    • Indicates that you excluded the database due to database corruption. The database is excluded from new or move mailbox operations when you don't specify the target mailbox database.

    • You need to use the IsExcludedFromProvisioningReason parameter if the property isn't already populated.

    • The IsExcludedFromProvisioningBy property is populated with your user account.

    • The IsExcludedFromProvisioning property is automatically set to $true.

  • $false   This is the default value. The database can be used in new or move mailbox operations when you don't specify the target mailbox database. You should manually configure this value only after the database corruption is fixed, or after the database is recreated.

IsExcludedFromProvisioningReason

Optional

System.String

The IsExcludedFromProvisioningReason parameter specifies the reason why you excluded the mailbox database from the mailbox provisioning load balancer. If the value contains spaces, enclose the value in quotation marks ("). The value must contain at least 10 characters.

This parameter requires a value when you set any of the following parameters to $true:

  • IsExcludedFromProvisioning

  • IsExcludedFromProvisioningByOperator

  • IsSuspendedFromProvisioning

IssueWarningQuota

Optional

Microsoft.Exchange.Data.Unlimited

The IssueWarningQuota parameter specifies the warning threshold for the size of the mailbox. If the mailbox reaches or exceeds this size, the user receives a descriptive warning message.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. When you enter a number, you can qualify it with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The IssueWarningQuota value must be less than or equal to the ProhibitSendReceiveQuota value.

This setting applies to all mailboxes in the database that don't have their own warning quota configured. The default value is 1.899 gigabytes (2,039,480,320 bytes).

IsSuspendedFromProvisioning

Optional

System.Boolean

The IsSuspendedFromProvisioning parameter specifies whether to exclude the database from the mailbox provisioning load balancer that distributes new mailboxes randomly and evenly across the available databases.

Valid values are:

  • $true

    • Indicates that you don't want the exclusion to be permanent. The database is excluded from new or move mailbox operations when you don't specify the target mailbox database.

    • You need to use the IsExcludedFromProvisioningReason parameter if the property isn't already populated.

    • The IsExcludedFromProvisioningBy property is populated with your user account.

  • $false   The database can be used in new or move mailbox operations when you don't specify the target mailbox database. This is the default value.

JournalRecipient

Optional

Microsoft.Exchange.Configuration.Tasks.RecipientIdParameter

The JournalRecipient parameter specifies the journal recipient to use for per-database journaling for all mailboxes on the database. You can use any value that uniquely identifies the recipient. For example:

For example:

  • Name

  • Display name

  • Alias

  • Distinguished name (DN)

  • Canonical DN

  • Email address

  • GUID

MailboxLoadBalanceEnabled

Optional

System.Boolean

This parameter is reserved for internal Microsoft use.

MailboxLoadBalanceMaximumEdbFileSize

Optional

Microsoft.Exchange.Data.ByteQuantifiedSize

This parameter is reserved for internal Microsoft use.

MailboxLoadBalanceOverloadedThreshold

Optional

System.Int32

This parameter is reserved for internal Microsoft use.

MailboxLoadBalanceRelativeLoadCapacity

Optional

System.Int32

This parameter is reserved for internal Microsoft use.

MailboxLoadBalanceUnderloadedThreshold

Optional

System.Int32

This parameter is reserved for internal Microsoft use.

MailboxProvisioningAttributes

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.MailboxProvisioningAttributes

This parameter is reserved for internal Microsoft use.

MailboxRetention

Optional

Microsoft.Exchange.Data.EnhancedTimeSpan

The MailboxRetention parameter specifies the length of time to keep deleted mailboxes before they are permanently deleted or purged.

To specify a value, enter it as a time span: dd.hh:mm:ss where dd = days, hh = hours, mm = minutes, and ss = seconds.

Valid values are 00:00:00 to 24855.03:14:07. The default value is 30.00:00:00 (30 days).

MaintenanceSchedule

Optional

Microsoft.Exchange.Data.Schedule

This parameter has been deprecated and is no longer used.

Although you can use this parameter to change the MaintenanceSchedule property of the database, the value is ignored.

MountAtStartup

Optional

System.Boolean

The MountAtStartup parameter specifies whether to mount the mailbox database when the Microsoft Exchange Information Store service starts. Valid values are:

  • $true   The database is mounted when the service starts. This is the default value.

  • $false   The database isn't mounted when the service starts.

Name

Optional

System.String

The Name parameter specifies the unique name of the mailbox database. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").

OfflineAddressBook

Optional

Microsoft.Exchange.Configuration.Tasks.OfflineAddressBookIdParameter

The OfflineAddressBook parameter specifies the offline address book that's associated with the mailbox database. You can use any value that uniquely identifies the offline address book. For example:

  • Name

  • Distinguished name (DN)

  • GUID

By default, this setting is blank ($null).

ProhibitSendQuota

Optional

Microsoft.Exchange.Data.Unlimited

The ProhibitSendQuota parameter specifies a size limit for the mailbox. If the mailbox reaches or exceeds this size, the mailbox can't send new messages, and the user receives a descriptive warning message.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. When you enter a number, you can qualify it with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The ProhibitSendQuota value must be less than or equal to the ProhibitSendReceiveQuota value.

This settings applies to all mailboxes in the database that don't have their own prohibit send quota configured. The default value is 2 gigabytes (2147483648 bytes).

ProhibitSendReceiveQuota

Optional

Microsoft.Exchange.Data.Unlimited

The ProhibitSendReceiveQuota parameter specifies a size limit for the mailbox. If the mailbox reaches or exceeds this size, the mailbox can't send or receive new messages. Messages sent to the mailbox are returned to the sender with a descriptive error message. This value effectively determines the maximum size of the mailbox.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. When you enter a number, you can qualify it with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The value must be greater than or equal to the ProhibitSendQuota or IssueWarningQuota values.

This setting applies to all mailboxes in the database that don't have their own prohibit send receive quota configured. The default value is 2.99804 gigabytes (2469396480 bytes)

PublicFolderDatabase

Optional

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

This parameter has been deprecated and is no longer used.

QuotaNotificationSchedule

Optional

Microsoft.Exchange.Data.Schedule

This parameter has been deprecated and is no longer used.

RecoverableItemsQuota

Optional

Microsoft.Exchange.Data.Unlimited

The RecoverableItemsQuota parameter specifies the maximum size for the Recoverable Items folder of the mailbox. If the Recoverable Items folder reaches or exceeds this size, it no longer accepts messages.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. The default value is 30 gigabytes (32212254720 bytes).

When you enter a number, you can qualify it with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The RecoverableItemsQuota value must be greater than or equal to the RecoverableItemsWarningQuota value.

This settings applies to all mailboxes in the database that don't have their own Recoverable Items quota configured.

RecoverableItemsWarningQuota

Optional

Microsoft.Exchange.Data.Unlimited

The RecoverableItemsWarningQuota parameter specifies the warning threshold for the size of the Recoverable Items folder for the mailbox. If the Recoverable Items folder reaches or exceeds this size, Exchange logs an event to the application event log.

A valid value is a number up to 1.999999999 terabytes (2199023254528 bytes) or the value unlimited. The default value is 20 gigabytes (21474836480 bytes).

When you enter a number, you can qualify it with one of the following units:

  • B (bytes)

  • KB (kilobytes)

  • MB (megabytes)

  • GB (gigabytes)

  • TB (terabytes)

Unqualified values are typically treated as bytes, but small values may be rounded up to the nearest kilobyte.

The RecoverableItemsWarningQuota value must be less than or equal to the RecoverableItemsQuota value.

This settings applies to all mailboxes in the database that don't have their own Recoverable Items warning quota configured.

RetainDeletedItemsUntilBackup

Optional

System.Boolean

The RetainDeletedItemsUntilBackup parameter specifies whether to keep items in the Recoverable Items\Deletions folder of the mailbox until the next database backup occurs. Valid values are:

  • $true   Deleted items are kept until the next mailbox database backup. This value could effectively override the deleted item retention and recoverable items quota values.

  • $false   Retention of deleted items doesn't depend on a backup of the mailbox database. This is the default value.

For more information, see Recoverable Items folder.

This settings applies to all mailboxes in the database that don't have this value specifically configured.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Show:
© 2016 Microsoft