Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have developed a library that makes use of WMI to query two specific properties namely:

WMI Query
SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = 'TRUE'


Win32_NetworkAdapterConfiguration properties

DNSDomainSuffixSearchOrder
DNSServerSearchOrder


The problem is that I can get the values on some computer client and on others I can't, reason being that the value within the MangementObjectCollection is null. Is there any other way of getting hold of the server IP addresses to be used in querying for DNS servers and getting the DNS domain suffixes without making use of WMI?

Alternatively, if WMI is the way to go, how can I get the values?

Many thanks in advance.
Kind regards,
Posted

1 solution

The problem you are seeing means probably that they are not configured.
if you do an ipconfig /all, and you don't see the data, it's just not present.
Domain name and dns domain suffixes must be configured explictly (in the IPV4 properties of the network card, or be supplied with DHCP, if you want them to show up anywhere.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900