4 Replies Latest reply on Sep 20, 2018 11:48 PM by DheerajMeher

    Query for additional DNS IP

    DheerajMeher Rookie

      How can we create query to get the information of additional DNS IP addresses(If configured) along with Primary and secondary DNS IP address??



        • 1. Re: Query for additional DNS IP
          Casity.chris SupportEmployee

          Hello DheerajMeher,


          You will want to query the "bound adapter" under network>TCPIP for Primary and Secondary DNS server. Below is how the query looks in the console window:


          ("Computer"."Network"."TCPIP"."Bound Adapter"."Primary DNS Server" EXISTS

          OR "Computer"."Network"."TCPIP"."Bound Adapter"."Secondary DNS Server" EXISTS)


          Feel free to modify this and add specific machine groups or a certain IP you are looking for. This is just a basic query that should gather all DNS entries for all network adapters on all machines. Be sure to group these two together if you are going to add any AND statements to the query.


          Don't forget to create a column set or modify the columns in the query to show all the information that you want to see when you run the query.


          I hope this helps.


          Chris Casity

          • 2. Re: Query for additional DNS IP
            DheerajMeher Rookie

            Hello Cris Casity,


            Thanks for your reply.


            With above query we can able to view Primary and Alternate DNS IP address. If we are using 3rd and 4th DNS IP(Additional DNS) on client systems, How can we gather that information in Ivanti Management console?


            Thanks in Advance.



            Dheeraj Meher

            • 3. Re: Query for additional DNS IP
              JoeDrwiega SupportEmployee

              Here is a powershell script you can run on devices and it will create a custom inventory reg key, so once you run it allow the inventory for it in Custom Data - Network  and the value is DNSServerSearchOrder. Be sure to test this and by the way it places all the IPs for DNS on one line and it is for IPEnabled =True for the active NIC:


              New-Item -Path "HKLM:\SOFTWARE\Wow6432Node\Intel\LANDesk\Inventory\Custom Fields\Network"

              $nicDetails = Get-WmiObject Win32_NetworkAdapterConfiguration -Filter "ipenabled='true'" | Where-Object {$_.DNSServerSearchOrder -ne $null}

              Foreach ($nic in $nicDetails){

                New-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Intel\LANDesk\Inventory\Custom Fields\Network" -Name "DNSServerSearchOrder" -Value $nic.DNSServerSearchOrder -PropertyType String -Force


              • 4. Re: Query for additional DNS IP
                DheerajMeher Rookie

                Hello Joe Drwiega,


                Thanks for resolving my query This solution is working fine.



                Dheeraj Meher