Commands › Exchange Online

Update-DatabaseSchema

Exchange Online ExchangeOnlineManagement Update-*

Upgrade the database schema for one or more databases after an Exchange software update that includes database schema updates is installed on Mailbox servers in a database availability group (DAG). Some software updates for Exchange might include database schema updates. After such an update is installed on all members of a DAG, the administrator must run the Update-DatabaseSchema cmdlet for each database in the DAG and dismount/mount or failover the database to trigger the database schema update. The in-place database schema upgrade engine ensures that no schema updates occur until all member

Quick start script

# Update-DatabaseSchema — 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-DatabaseSchema
$before | Format-List

# 3. Make the change (dry run first)
Update-DatabaseSchema -Identity <DatabaseIdParameter> -MajorVersion <UInt16> -MinorVersion <UInt16> -WhatIf
Update-DatabaseSchema -Identity <DatabaseIdParameter> -MajorVersion <UInt16> -MinorVersion <UInt16>

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

Syntax

Update-DatabaseSchema [-Identity] <DatabaseIdParameter> -MajorVersion <UInt16> -MinorVersion <UInt16>
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

Parameters (5)

ParameterTypeRequiredWhat it controls
-Identity DatabaseIdParameter yes The Identity parameter specifies the mailbox database for which you want to set one or more attributes. You can use any value that uniquely identifies the database. For example:
-MajorVersion UInt16 yes This parameter is reserved for internal Microsoft use.
-MinorVersion UInt16 yes This parameter is reserved for internal Microsoft use.
-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.
-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.