Check Exchange schema version

When installing a cumulative update for Exchange Server, it’s often unclear whether a schema update is necessary. Microsoft usually specifies the required schema version.

To check if I’m already using the correct version, I wrote a PowerShell script that outputs the Exchange schema version:

# Exchange Schema Version
 
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn
 
$sc = (Get-ADRootDSE).SchemaNamingContext
$ob = "CN=ms-Exch-Schema-Version-Pt," + $sc
$ru = "RangeUpper: $((Get-ADObject $ob -pr rangeUpper).rangeUpper)"
 
$dc = (Get-ADRootDSE).DefaultNamingContext
$ob = "CN=Microsoft Exchange System Objects," + $dc
$ovd = "ObjectVersion (Default): $((Get-ADObject $ob -pr objectVersion).objectVersion)"
 
$cc = (Get-ADRootDSE).ConfigurationNamingContext
$fl = "(objectClass=msExchOrganizationContainer)"
$ovc = "ObjectVersion (Configuration): $((Get-ADObject -LDAPFilter $fl -SearchBase $cc -pr objectVersion).objectVersion)"
 
Write-Output $ru $ovd $ovc

You can find a good table view of a collection of the Microsoft Exchange Server schema versions on Ali Tarjans website: Exchange Schema Versions (Up to Date List) – ALI TAJRAN

Schreibe einen Kommentar