2015-09-04 251 views

回答

1

我找到了解决方案。

$myDNSServer = "[email protected]" 
$DNSZones = Get-DnsServerZone -ComputerName (Get-ADDomainController -Discover -Service PrimaryDC) 
foreach($aZone in $DNSZones) 
{ 
    Remove-DnsServerResourceRecord -ZoneName $aZone.ZoneName -RRType Ns -RecordData $myDNSServer -ComputerName $PDCE -Force 
} 

该脚本将删除您从ServerResourceRecords搜索的所有记录。