How To Manage DNS Records With PowerShell

Most of the time, DNS records are managed dynamically by your DNS server. However, at times you may need to manually create, edit, or remove various types of DNS records. It is at times like this that PowerShell becomes quite useful for managing these records. In this video, David will demonstrate how to find DNS records using the Get-DnsServerResourceRecord cmdlet, add A records with the Add-DnsServerResourceRecordA cmdlet, add PTR records with the Add-DnsServerResourceRecordPtr and add CNAME records with the Add-DnsServerResourceRecordCName command. Once we’ve got a few records created, we can then remove DNS records with the Remove-DnsServerResourceRecord cmdlet. Finally, we’ll move into working with zones where we’ll use the Add-DnsServerPrimaryZone to create DNS primary zones and then use the Get-DnsServerZone to find DNS zones. As a bonus, we’ll then show you how to re-register your SRV records by restarting the netlogon service because using Register-DnsClient won’t do the trick. Prerequisites include: Windows Server 2012 or 2016 with the following roles: Active Directory Domain Services DNS Server PowerShell with the following modules loaded: ActiveDirectory DnsServer