Get Domain And Forest Info Using Active Directory PowerShell Module

Today’s post will be the last post In the Active Directory PowerShell Module series and it will show how get Information about the AD Domain and Forest using The Active Directory PS Module.

This article follows the previous article where I have showed how to Manage Organizational Units Using Active Directory PowerShell.

To get started the cmdlet below will show you how to get Information about the domain:

Get-ADDomain

To get Information about Domain Controllers type:

Get-ADDomainController

To get Information about the forest type:

Get-ADForest

To get domain mode type:

Get-ADDomain | select name, domainmode

To get the forest mode run:

Get-ADForest | select name, forestmode

To change the domain mode use:

Set-ADDomainMode test.local -DomainMode Windows2016Domain

To add a new DNS UPN suffix:

Set-ADForest test.local -UPNSuffixes @{add="test.org"} -Verbose -PassThru

To change the forest mode type:

Set-ADForestMode test.local -DomainMode Windows2016Domain

To get trusted domains type:

Get-ADTrust -Filter *

To view Root Domain Information type:

To get Information about the Root Domain use:

Get-ADRootDSE

Leave a Reply