resolve-dnsname and PTR/reverse zones

the documentation sure says PTR is a valid option for -Type, but I can’t figure out how to query a reverse zone for ptr records.

resolve-dnsname 10.10.10.in-addr.arpa -Server MyDNSServer -type any

returns NS, SOA and A records for that 10.10.10.0 reverse zone, but no PTR records (yes, there are PTR records in the zone). so obviously

resolve-dnsname 10.10.10.in-addr.arpa -Server MyDNSServer -type ptr

returns nothing.

anybody know what i’m doing wrong?

Hey John,

You will need to specify the IP address of the record you are trying to complete a reverse look up i.e. below.

Resolve-DnsName -Server dns.google.com -Name 8.8.8.8 -Type ptr | FL

Name : 8.8.8.8.in-addr.arpa
Type : PTR
TTL : 21073
Section : Answer
NameHost : dns.google

 

 

i figured it out. i’m trying to query for all PTR records in a reverse zone. like the nslookup command

ls -d 10.10.10.in-addr.arpa

but resolve-dns name is for querying for an individual address. so when i point it at 10.10.10.in-addr.arpa , i’m only getting the records for that zone itself, not the records it contains.

this does what i want:

get-dnsserverresourcerecord 10.10.10.in-addr.arpa -computername myDNSserver -rrtype ptr

John,

Yes, that is correct, essentially you are tyring to complete an entire Dig of a ReverseLookup zone. That is out of the scope of Resolve-DNSName. Glad you were able to figure it out quickly! Let us know if you have any other questions.