RE: Questions regarding which APIs to use to retrieve network info

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Rhett,
Thanks for the quick response. After posting my question I came across a
utility, dnscmd, that appears to be able to give the information I'm looking
for (locally and remotely). I've only tried it against Windows 2003 servers.
It gives information about root hints and forwarders. My follow up
questions are as follows:

1) I know I asked for a Win2000 / Win2003 solution, but is there any
programmatic way (other than WMI) to retrieve the root hints and forwarders
from a DNS server? (If the answer to this question is no, then essentially
this means that dnscmd uses WMI, correct?)

2) I found the cache.dns file prior to posting my question, but it appears
to be a static file, rather than reflecting the DNS Server Cache from one
moment to the next. Is reading the cache.dns file going to give me the same
information as the information I can see about root hints in dnsmgmt?

Thanks,

Matt


"Rhett Gong [MSFT]" wrote:

> Hello Matt,
> Please check inline for these 2 questions.
> >I need to retrieve the list of IP addresses of Forwarders to which a DNS
> >server forwards queries.
> We can query the Forwarders[] properties of MicrosoftDNS_Server for this IP
> list.
>
> >I need to retrieve a list of root hints configured for a DNS server.
> If you can't use WMI then there is no other api to retrieve a list of root
> hint. You may go dig into Cache.dns file under the
> %SystemRoot%\\System32\\Dns to retrieve this information.
>
> Please let me know if my answer helps you resolve the problem. If there is
> anything more I can assist you, please feel free to let me know.
>
> Thanks,
> Rhett Gong [MSFT]
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
> &SD=msdn
>
> This posting is provided "AS IS" with no warranties and confers no rights.
>
>
.



Relevant Pages

  • RE: Questions regarding which APIs to use to retrieve network info
    ... I am able to retrieve both the root ... hints that are configured for the DNS server as well as any forwarders ... it would appear that unless dnscmd uses WMI ... > It gives information about root hints and forwarders. ...
    (microsoft.public.win32.programmer.networks)
  • Re: One DC crashed and the other didnt take over - Please assist
    ... Error: Root hints list has invalid root hint server: ... DNS server: 128.63.2.53 ... test failures on this DNS server ...
    (microsoft.public.windows.server.active_directory)
  • Re: One server cant read GPO/bind to domain
    ... You need to delete the root hints zone. ... expand the DNS Server object. ... Root hints are still default on the DNS servers. ... test failure on this DNS server ...
    (microsoft.public.windows.server.active_directory)
  • Re: XP Professional hangs on boot for several minutes
    ... Posting on MS newsgroup will benefit all readers and you may get more help. ... >> 2) XP clients can find the DNS server. ... >> Don't send e-mail or reply to me except you need consulting services. ... >>> pause occurs before the network connection settings are loaded. ...
    (microsoft.public.windowsxp.network_web)
  • AX
    ... Error: Root hints list has invalid root hint server: ... DNS server: 128.63.2.53 ... test failure on this DNS server ... PTR record query for the ...
    (microsoft.public.windows.server.active_directory)