Add multiple DNS servers as name servers to multiple DNS zones all in once. So this is essentially adding NS resource records to a zone, but doing it for multiple zones all at once. So, here’s a quick one-liner that does the trick, obviously substitute in your DNS server and name server FQDNs in the correct places. If it fails for any reason it will continue on, but report the zone it failed on.
Get-DnsServerZone -ComputerName dnsserver.vmwareenterprise.com | where {$_.zonetype -eq “primary” -or $_.zonetype -eq “secondary”} | ForEach-Object {try {Add-DnsServerResourceRecord -ZoneName $_.zonename -ns -ComputerName dnsserver.domain.com -name $_.zonename -NameServer newdnsserver.vmeareenterprise.com -ea:stop} catch {“$_”}}
d5swtf
2q4i1y
Terrific work! This is the type of info that should be shared around the internet. Shame on the search engines for not positioning this post higher! Come on over and visit my website . Thanks =)