One-Liner: Active Directory Schema Version


 

Rules rule! What's a directory service without schema?

 

This week I was asked about the Active Directory schema version for Windows Server 2012 R2.

 

Here’s how to get hold of it with PowerShell:

 

Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion

 

 

The cmdlet in brackets (Get-ADRootDSE) is executed first. The “.”is used to access the schemaNamingContext property on the returned RootDSE object. This is then passed to the Get-ADObject cmdlet which returns an object representing the Schema, including the objectVersion property. Simple!

 

 

And, just in case you don’t have them jotted down, here's what the returned versions equate to:

 

69 = Windows Server 2012 R2

56 = Windows Server 2012

47 = Windows Server 2008 R2

44 = Windows Server 2008

31 = Windows Server 2003 R2

30 = Windows Server 2003

13 = Windows 2000



Comments (1)

  1. Mauro Rita says:

    With a few obscure ones :

    2000 13
    2003 30
    2003 R2 31
    2008 Beta 39 ( "Wacky Schema Version" )
    2008 44
    2008 R2 47
    Server 8 Developer's Preview 51
    Server 8 Beta 52
    2012 56
    2012 R2 69