HeadShot September 2014.jpg

Kieran Jacobsen is the Head of Information Technology at Readify, a Microsoft MVP and regular speaker at conferences throughout Australia.

Bulk DNS PTR record creation

Many years ago, a poorly informed technician on a vendor support line claimed that because we had "GAPS" (his words not mine) in our reverse look up zones that their application was running poorly. Missing entries in your reverse lookup zone can be caused by computers not registering their PTR records, the DHCP server not doing so, or in some cases the DNS server not creating the records correctly; for the record, our "gaps" were because on that subnet, only a dozen or so clients were residing and hence, only a few entries existed (and they were all correct too).

To prove the vendor wrong, i went a created "filler" entries in that subnet using PowerShell. See below:

$dnsserver = <your dns server >
$namespace = <namespace - format 201.168.192.in-addr.arpa>
$startip = <if you want to create a whole standard class C subnet, this is 1>
$endip = <if you want to create a whole standard class C subnet, this is 255>

for ($ii=$startip; $ii -lt $endip; $ii++) {
    dnscmd $dnsserver /recordadd $namespace $ii "ptr" "FakeDummyAddress"
}

Bulk import of DNS PTR Records

DNS Cleanup - Removing an old DNS Server