Perhaps it’s been a couple of years since you extended your Active Directory schema. Or maybe you inherited someone else’s installation and documentation is non-existent.
With the following PowerShell script you can read the exact version number of your Active Directory schema. You’ll get both the Windows schema version and the version of any Exchange schema extensions.
You need the PowerShell module for Active Directory on your system. This is available by default on your domain controllers and can be installed via the RSAT component on other systems.
The version information is read directly from Active Directory, you don’t need an elevated prompt to run it.
Execute the following script to read the schema version info:
Import-Module ActiveDirectory
$SchemaVersions = @()
$SchemaPartition = (Get-ADRootDSE).NamingContexts | ? { $_.SubString(0, 9).ToLower() -eq 'cn=schema' }
$SchemaVersionAD = (Get-ADObject $SchemaPartition -Property objectVersion).objectVersion
$SchemaVersions += @{'Active Directory' = $SchemaVersionAD}
$SchemaPathExchange = "CN=ms-Exch-Schema-Version-Pt,$SchemaPartition"
If (Test-Path "AD:$SchemaPathExchange") {
$SchemaVersionExchange = (Get-ADObject $SchemaPathExchange -Property rangeUpper).rangeUpper
}
Else {
$SchemaVersionExchange = 0
}
$SchemaVersions += @{'Exchange' = $SchemaVersionExchange}
Write-Output $SchemaVersions
Depending on your Active Directory and Exchange schema versions the script will produce output similar to the following:
Name Value ---- ----- Active Directory 87 Exchange 15303
AD and Exchange Schema Version Reference Tables
To interpret the output values from the script use the following tables:
Active Directory Schema Version
AD Version | Schema Version |
---|---|
Windows server 2019 | 88 |
Windows Server 2016 | 87 |
Windows Server 2012 R2 | 69 |
Windows Server 2012 | 56 |
Windows Server 2008 R2 | 47 |
Windows Server 2008 | 44 |
Windows Server 2003 R2 | 31 |
Windows Server 2003 | 30 |
Windows 2000 Server | 13 |
Exchange Schema Version Numbers
Exchange Version | Schema Version |
---|---|
Exchange 2019 CU12 | 17003 |
Exchange 2019 CU8 | 17002 |
Exchange 2019 CU2 | 17001 |
Exchange 2019 RTM | 17000 |
Exchange 2016 CU21 | 15334 |
Exchange 2016 CU19 | 15333 |
Exchange 2016 CU7 | 15332 |
Exchange 2016 CU6 | 15330 |
Exchange 2016 CU3 | 15326 |
Exchange 2016 CU2 | 15325 |
Exchange 2016 CU1 | 15323 |
Exchange 2016 RTM | 15317 |
Exchange 2013 CU7 | 15312 |
Exchange 2013 CU6 | 15303 |
Exchange 2013 CU5 | 15300 |
Exchange 2013 SP1 (CU4) | 15292 |
Exchange 2013 CU3 | 15283 |
Exchange 2013 CU2 | 15281 |
Exchange 2013 CU1 | 15254 |
Exchange 2013 RTM | 15137 |
Exchange 2010 SP3 | 14734 |
Exchange 2010 SP2 | 14732 |
Exchange 2010 SP1 | 14726 |
Exchange 2010 RTM | 14622 |
Exchange 2007 SP3 | 14625 |
Exchange 2007 SP2 | 14622 |
Exchange 2007 SP1 | 11116 |
Exchange 2007 RTM | 10637 |
Exchange 2003 RTM | 6870 |
Exchange 2000 SP2 | 4406 |
Exchange 2000 RTM | 4397 |