Musings on the splendour of PowerShell One-Liner: Active Directory Schema Version - PoSh Chap - Site Home - TechNet Blogs

PoSh Chap

Musings on the splendour of PowerShell

One-Liner: Active Directory Schema Version

One-Liner: Active Directory Schema Version

  • Comments 1
  • Likes

 

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
  • 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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment