This blog post explains how to get the Domain and Forest level of your Active Directory using Windows PowerShell.
There are 2 cmdlets:
- Get-ADDomain
- Get-ADForest
You can filter the results with Name and Domain/Forest Mode parameters:
PS C:\Users\Administrator> Get-ADDomain | fl Name,DomainMode Name : get-cmd DomainMode : Windows2016Domain PS C:\Users\Administrator> Get-ADForest | fl Name,ForestMode Name : get-cmd.Local ForestMode : Windows2016Forest
Thanks for reading! You can follow me on Twitter @PrigentNico