How To Manage DNS Zones And Records With PowerShell

When you have a lot of records and/or zones in your DNS server, using the GUI can be rather arduous. Luckily you stumbled onto something magical: the snip that will show you how to automate your DNS server using PowerShell!

Anthony will show you have to manage your zoning better than your local city council using Get-DnsServerZone to retrieve your existing zones, Add-DnsServerPrimaryZone and Add-DnsServerSecondaryZone to add zones, and then Remove-DnsServerZone to remove them. Then he’ll walk you through managing your records using Add-DnsServerResourceRecord, editing them using Set-DnsServerResourceRecord, and removing them using Remove-DnsServerResourceRecord.