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