#Domain names in forest
$ForestInfo = Get-ADForest
$Domains =$forestInfo.domains
$FileName = “DNSForwarder”+”$(get-date -Format MM-dd-yyyy)”+”.csv”
$FilePath = “c:\temp”
foreach($domain in $domains){
Write-Output “Working on $domain”
get-dnsserverforwarder -computer $domain| select IPAddress, @{l=”Domain”;e={$domain}}| Export-Csv -NoTypeInformation $FilePath\$FileName -append
}
Pretty section of content. I just stumbled upon your site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Anyway I’ll be subscribing to your feeds and even I achievement you access consistently quickly.