Home » PowerShell » Check AD Schema Version using PowerShell command

Check AD Schema Version using PowerShell command

In this article, I will show you how to check AD Schema version using PowerShell command. You will required administrator permission to get active directory schema.

Overview

Following steps describes how to check ad schema version using PowerShell. You can use any one of the methods:

Window Server Version and Schema Version List

Here’s the list of window server version and Active Directory schema version.

Window Server VersionSchema Version
Windows Server 200013
Windows Server 200330
Windows Server 2003 R231
Windows Server 200844
Windows Server 2008 R247
Windows Server 201256
Windows Server 2012 R269
Windows Server 201687
Windows Server 201988
Active Directory Schema Version number

Cool Tip: How to get certificates using PowerShell !

Get ad schema version using Get-AdObject

Open PowerShell with administrator permission.

Run below command to get active directory schema version

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

Above command returns DistinguishedName, Name, ObjectClass, ObjectGUI and ObjectVersion. ObjectVersion represents ad schema version for active directory on window server.

Output of above command to get ad schema version on Window server 2019 system as below

Get Ad Schema Version Windows Server 2019
Get Ad Schema Version Windows Server 2019

Get ad schema version using ADSIEdit.msc

  • Start ADSIEdit.msc
  • Navigate to "CN=Schema,CN=Configuration,DC=domain,DC=local"
  • Scroll down to see current objectversion attribute value

Cool Tip: Do you know equivalent of cat command in Windows!

Get ad schema version using DSQuery command line to

dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion

Conclusion

Hope you find above article helpful and educational to check and get active directory schema version in Windows Server.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on ShellGeek home page.

Leave a Comment