Pardon me if I am posting this in the wrong forum…
Using the following relevance query I am attempting to obtain a list of all machines in the network using a specific network adapter. However, the results are less than specific. It is returning several and responses as well.
string values of properties “Name” of (select objects (“Name FROM Win32_networkadapter WHERE Name = ‘Intel® PRO/1000 MT Network Connection’”) of wmi)
I have also tried:
string values of properties “Name” of (select objects (“Name, NetConnectionID FROM Win32_networkadapter WHERE Name = ‘Intel® PRO/1000 MT Network Connection’”) of wmi) whose (exists string value of property “NetConnectionID” of it )
…which, for the most part seems to return similar results.
Any idea how I might narrow down the results for this query? Thank you for your time.
It sounds like you are getting when a computer does not have the Intel network adapter, and return when a computer has multiple NICs.
Here are 2 suggestions:
Add “Unique values” to your query, so that only one item is returned:
unique values of string values of properties “Name” of (select objects (“Name FROM Win32_networkadapter WHERE Name = ‘Intel® PRO/1000 MT Network Connection’”) of wmi)
If you want something more description then returned, we should look into using the IF-THEN-ELSE statement.
Or you can name your Manage Property something like: “Intel® PRO/1000 MT Network Adapter Installed”, then use the EXISTS clause to return True and False:
exists string values of properties “Name” of (select objects (“Name FROM Win32_networkadapter WHERE Name = ‘Intel® PRO/1000 MT Network Connection’”) of wmi)
Do you expect the results? Meaning for those computers returning , do they have the Intel NIC that you are looking for?
You can create a new Manage Property with the query without the Where clause to see all the results returned.
I am not sure WMI where clause supports the LIKE operator, so here is an idea. The following might be a better construct using Contains in the Relevance Language so that you can look for a substring, rather than having to find the exact match:
(string values of selects “name from win32_networkadapter” of wmi) whose (it as lowercase contains “intel”)