Friday, April 10, 2015

Commands for Windows and Active Directory Administration

What command you use for Trust Creation?
Netdom Trust

What command you use to view FSMO Roles
Netdom query fsmo

or

DSQuery server –hasfsmo –pdc
DSQuery server –hasfsmo –infr
DSQuery server –hasfsmo –rid
DSQuery server –hasfsmo –name
DSQuery server –hasfsmo –schema

What command you use to query AD
DSQuery

How to Check Domain and Forest Functional level?
Forest Functional Level (FFL) and Domain Functional Level (DFL) of Active Directory from command line or using PowerShell:

Get Domain Functional Level using PowerShell:
Get-ADDomain | fl Name,DomainMode

Get Forest Functional Level using PowerShell:
Get-ADForest | fl Name,ForestMode

Get Forest Functional Level using dsquery:

dsquery * "CN=Partitions,CN=Configuration,DC=lab,DC=local" -scope base -attr msDS-Behavior-Version