Commands › Exchange Online
Update-DatabaseSchema
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.