Remove DNS Host Record and PTR with PowerShell

You have been asked, “Please remove the host record for these 15 computers, plus their associated PTR records”.  It isn’t a difficult task, but it can be time consuming, especially if you have a large DNS database.  The bit can be annoying to do over and over again.  When I first decided to automate this task, I went looking to see who had done something similar before, and found  My code, Remove-DNSRecord.ps1,  is based on his, and extends it by searching all zones, and by creating an advanced function.  The script relies on the PowerShell DNSServer Module, which is available on Server 2008 and later.
Script Text

About Alan

This entry was posted in Active Directory, Windows Administration and tagged , , . Bookmark the permalink.

Leave a Reply