Home » PowerShell » How to Check AD Schema Version using PowerShell

How to Check AD Schema Version using PowerShell

Active Directory schema defines the attributes and object classes that can be stored in your directory, impacting user accounts, groups, and more.

To ensure your AD environment is up-to-date and compatible with the latest capabilities, it’s crucial to check the AD schema version.

In this article, we will discuss how to check the AD Schema version using PowerShell.

How to Check AD Schema Version Using Get-AdObject

To check an active directory schema version, use the Get-AdObject cmdlet in PowerShell.

Follow the below steps to check the ad schema version.

Step 1: Open PowerShell with administrator permission. This ensures you have the necessary permissions to access AD schema information.

Step 2: Run the following command to get the active directory schema version.

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

The Get-AdObject command returns DistinguishedName, Name, ObjectClass, ObjectGUI and ObjectVersion. ObjectVersion represents the ad schema version for the active directory on the Windows server.

The output of the above command to get ad schema version on the Windows Server 2019 system is as below.

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

How to Check AD Schema Version using ADSIEdit.msc

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

The objectversion attribute value contains the Active Directory schema version. On the Windows Server 2016, the active directory schema version is 87.

How to Get AD Schema Version using DSQuery command

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

Active Directory Schema Version List

Window Server Version and Schema Version List

Here’s the list of Windows server versions and Active Directory schema versions.

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

Conclusion

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

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

Leave a Comment