Owlglass

PowerShell - Get Domain Controllers in Forest

To list all of the domain controllers in an Active Directory forest:

(Get-ADForest).Domains | %{ Get-ADDomainController -Filter * -Server $_ }| Format-Table -Property Name,ComputerObjectDN,Domain,Forest,IPv4Address,OperatingSystem,OperatingSystemVersion