Is there a way to run a report to see what DNS servers are being used by computers?

Comments

9 comments

  • Jason Hanks

    Hi Kevin,

    You can do this in PDQ Inventory if you are using a Pro or Enterprise license and using a custom scan profile.

    I've attached a profile that will scan `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\`

    Once you import this scan profile called "DNS scan" you should be able to scan your machines and pull that information from the registry of your target machines.

    Now we need to take that info and put it into a report. I'm attaching a report that you can import that will show the columns of computer name and registry value called "DNS Entries".

    I've added a Filter saying that I want to find the Value Name containing NameServer (where the DNS entries are stored). This will show you all the DNS entries on one line for each adapter that you have present.

    Jason

    0
    Comment actions Permalink
  • SelfMan

    Do you mean additional/manually configured DNS servers? Because the usual practice is that these are assigned by the DHCP server and you are in control of that. You can run the "netsh interface ipv4 show dnsservers" command on each computer and collect the information in a shared folder. Like this:

    netsh interface ipv4 show dnsservers >\\server\share\dns-%computername%.txt

    0
    Comment actions Permalink
  • Kevin Pierce

    -Jason. Thanks for your help. That worked fine.

    0
    Comment actions Permalink
  • Charley Horn

    Another method.

    0
    Comment actions Permalink
  • Beth Kretzinger

    I'm trying to get the same results that Kevin was. Could I get a copy of the custom scan profile?

    0
    Comment actions Permalink
  • Dwayne Price

    Jason, can I get a copy of that scan profile? I am trying to do the same thing.

    Thanks!

    Dwayne

    0
    Comment actions Permalink
  • Colby Bouma

    I believe these will do what you are looking for.

    NameServer shows static entries and DhcpNameServer shows entries set by DHCP.

    DNS Scan:

    <?xml version="1.0" encoding="utf-8"?>
    <AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="12.2.0.0" MinimumVersion="9.0">
    <ScanProfile>
    <Description></Description>
    <ScanProfileId value="7" />
    <IsDefault value="false" />
    <Name>DNS Scan</Name>
    <Scanners type="list">
    <Scanner>
    <ExcludePattern></ExcludePattern>
    <Hive>HKEY_LOCAL_MACHINE</Hive>
    <IncludePattern>SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\*\DhcpNameServer
    SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\*\NameServer</IncludePattern>
    <RowLimit value="2500" />
    <TypeName>Registry</TypeName>
    <SourceScannerId value="31" />
    </Scanner>
    </Scanners>
    <ScheduleTriggers type="list" />
    </ScanProfile>
    </AdminArsenal.Export>

     

    DNS Entries:

    <?xml version="1.0" encoding="utf-8"?>
    <AdminArsenal.Export Code="PDQInventory" Name="PDQ Inventory" Version="12.2.0.0" MinimumVersion="3.1">
    <Report>
    <ReportDefinition name="Definition">
    <Columns type="list">
    <Column>
    <Column>Name</Column>
    <Summary></Summary>
    <Table>Computer</Table>
    <Title></Title>
    </Column>
    <Column>
    <Column>Name</Column>
    <Summary></Summary>
    <Table>Registry</Table>
    <Title></Title>
    </Column>
    <Column>
    <Column>Value</Column>
    <Summary></Summary>
    <Table>Registry</Table>
    <Title>DNS Entries</Title>
    </Column>
    </Columns>
    <RootFilter name="Filter">
    <Comparison>All</Comparison>
    <Filters type="list">
    <GroupFilter>
    <Comparison>All</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Value</Column>
    <Comparison>!Equals</Comparison>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    <GroupFilter>
    <Comparison>Any</Comparison>
    <Filters type="list">
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>DhcpNameServer</Value>
    </ValueFilter>
    <ValueFilter>
    <Table>Registry</Table>
    <Column>Name</Column>
    <Comparison>Equals</Comparison>
    <Value>NameServer</Value>
    </ValueFilter>
    </Filters>
    </GroupFilter>
    </Filters>
    </RootFilter>
    <ReportDefinitionTypeName>BasicReportDefinition</ReportDefinitionTypeName>
    </ReportDefinition>
    <Description></Description>
    <Name>DNS Entries</Name>
    <ReportFolderId value="1" />
    <ReportType>BasicReport</ReportType>
    </Report>
    </AdminArsenal.Export>
    0
    Comment actions Permalink
  • Dwayne Price

    Thanks, Colby. That worked PERFECTLY! Really appreciate it!

     

    0
    Comment actions Permalink
  • Grant Bordelon

    Colby, you just saved my butt! Thank you so much!

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.