Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Delete "unknown" Name Servers with PowerShell

$
0
0

This is what I have so far...

Import-Module ActiveDirectory, DnsServer

$DNSserver = "server01"

$zoneNamesArray = Get-DnsServerZone -ComputerName $dnsserver | select -ExpandProperty Zonename

foreach ($zone in $zoneNamesArray) {
    Write-Host "===========================" -BackgroundColor DarkMagenta
    Write-host $zone -ForegroundColor Yellow   
    Get-DnsServerResourceRecord -ZoneName $zone -ComputerName $DNSserver -RRType "NS" -Node            
}


I'm struggling with the concept/idea on how to access the Name Servers and find out which ones are "unknown"



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>