Just a note to myself. A quick way to find the domain functional level as well as other details is the Get-ADRootDSE
cmdlet. By default it connects to the DC you are on (or authenticated with if you are running it from a client) but you can specify a different server via the -Server <servername>
switch.
Example default output:
1 2 3 4 5 6 7 8 9 10 |
PS> Get-ADRootDSE configurationNamingContext : CN=Configuration,DC=rakhesh,DC=local currentTime : 06/12/2014 20:07:38 defaultNamingContext : DC=rakhesh,DC=local dnsHostName : WIN-DC01.rakhesh.local domainControllerFunctionality : Windows2012R2 domainFunctionality : Windows2008Domain <snip> |
Example stuff you can do with it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# find all the NC locations PS> Get-ADRootDSE | select *Naming* configurationNamingContext : CN=Configuration,DC=rakhesh,DC=local defaultNamingContext : DC=rakhesh,DC=local namingContexts : {DC=rakhesh,DC=local, CN=Configuration,DC=rakhesh,DC=local, CN=Schema,CN=Configuration,DC=rakhesh,DC=local, DC=DomainDnsZones,DC=rakhesh,DC=local...} rootDomainNamingContext : DC=rakhesh,DC=local schemaNamingContext : CN=Schema,CN=Configuration,DC=rakhesh,DC=local # find Application NCs hosted on the server you are connected to PS> Get-ADRootDSE | select *Naming* -ExpandProperty namingContexts DC=rakhesh,DC=local CN=Configuration,DC=rakhesh,DC=local CN=Schema,CN=Configuration,DC=rakhesh,DC=local DC=DomainDnsZones,DC=rakhesh,DC=local DC=ForestDnsZones,DC=rakhesh,DC=local DC=SomeApp2,DC=rakhesh,DC=local # find highest committed USN on that server PS> (Get-ADRootDSE -Server WIN-DC03).highestCommittedUSN |