HOW GET VERSION OF FOREST SCHEMA (adprep /forestprep)
dsquery * cn=schema,cn=configuration,dc=domainname,dc=local -scope base -attr objectVersion
repadmin /showattr * cn=schema,cn=configuration,dc=lab,dc=fujitsu,dc=local /atts:ObjectVersion
POWERSHELL : Get-ADObject (get-adrootdse).schemaNamingContext -Property objectVersion
13 – server 2000
30 – server 2003
31 – server 2003 r2
44 – server 2008
47 – server 2008 r2
56 – server 2012
69 – server 2012 r2
87 – server 2016
88 – server 2019
88 – server 2022 (OS Build 20298.1 Preview)
Get version of domain version (adprep /domainprep)
get-adobject -ldapfilter ‚(&(objectClass=Container)(cn=ActiveDirectoryUpdate))‘ -Properties *| select Name, CanonicalName,revision
or
get-adobject -filter {objectClass -like ‚Container‘ -and cn -like ‚ActiveDirectoryUpdate‘} -Properties * | select revision
REVISION NUMBER:
3 = Windows Server 2008
5 = Windows Server 2008R2
9 = Windows Server 2012
10 = Windows Server 2012R2
15 = Windows Server 2016
16 = Windows Server 2019
16 = Windows Server 2022 (OS Build 20298.1 Preview)
How get current version of Forest Functional Level
dsquery * „CN=Partitions,CN=Configuration,DC=lab,DC=local“ -scope base -attr msDS-Behavior-Version
or
Get-ADObject -Filter {CN -like „Partitions“} -SearchBase „CN=Configuration,DC=master,DC=com“ -Properties * | select msDS-Behavior-Version
0 = Windows 2000
1 = Windows 2003 interim
2 = Windows 2003
3 = Windows 2008
4 = Windows 2008 R2
5 = Windows 2012
6 = Windows 2012 R2
7 = Windows Server 2016
7 = Windows Server 2019 (There is no update in FFL)
7 = Windows Server 2022 (There is no update in FFL)
10 = vNext Windows Server 2025
How get current version of Domain Functional Level
dsquery * „DC=lab,DC=local“ -scope base -attr msDS-Behavior-Version
or
get-adobject (Get-ADRootDSE).defaultnamingcontext -Properties * | select msDS-Behavior-Version
0,0 = Windows 2000 Native
0,1 = Windows 2000 Mixed
2,0 = Windows 2003
3,0 = Windows 2008
4,0 = Windows 2008 R2
5,0 = Windows 2012
6,0 = Windows 2012 R2
7.0 = Windows Server 2016
7.0 = Windows Server 2019 (There is no update in DFL)
7.0 = Windows Server 2022 (There is no update in DFL)
10 = vNext Windows Server 2025