Share via


Disparity between Powershell Resolve-DnsName and nslookup

Question

Friday, September 30, 2016 9:52 PM

When I issue the command, "resolve-dnsname -name "xx.xx.xx.xx" -Server MyDNSServer -Type PTR I get matches on a couple of IPs that I do not see in the GUI (dnsmgmt.msc) nor in nslookup. Oddly, the output of the cmdlet is as follows:

Name                                   Type                  TTL               Section                  NameHost 

xx.xx.xx.xx.in-addr.arpa       PTR                    1200             Question                host.domain.com

Where is this section called "Question"?? It seems that this cmdlet is seeing something that I do not see in the gui or nslookup.

P.S. I found this out since I need to bulk add records (A and corresponding PTR) and first did a check if they exist.  In these few cases, it showed up as existing but I do not see them in the gui.

All replies (3)

Monday, October 3, 2016 4:51 AM âś…Answered

Hi JohnnyOH,

I tested in my lab, and find the following scenario get the same result with you:

Originally, I have PTR record 192.168.2.56 PTR 2008R2.test.com in the reverse lookup zone; Then I delete the PTR record; then query for the record:

In powershell cmdlet, we can get the record, while nslookup and GUI do not have.

Although after restarting powershell and clearing dns cache, we can still query that record:

So, I guest the record is an old record that exits in your reverse lookup zone before.

Best Regards,

Anne 

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Saturday, October 1, 2016 4:22 AM

Not sure of this, but might be just a special handling of PTR records. This might be referring to the Question Section of the answer packet.


Monday, October 3, 2016 9:29 PM

I don't think it was an old record- new zone created about 3 months old.  I also did look to see if the server itself had it cached (Cached lookups ala dnsmgmt.msc-->View-->Advanced) but it did not. It is a mystery but one in which production does not appear affected. Thanks.