I was doing a report on a group of servers, about 100 of them, showing the number of network cards in the system. The reference code in the analysis used for this was: descriptions of adapters of network
The problem I just found (after submitting the report and finding this problem) is that if there are any DISABLED network cards, they will NOT be reported. How can this be solved? Should I just query the WMI directly to do this and not use the BigFix reference table?
(if exists string value of property “NetConnectionID” of it then string value of property “Name” of it else “N/A”)of (select objects (“Name, NetConnectionID FROM Win32_networkadapter”) of wmi)
Shows the results as
HP NC3163 Fast Ethernet NIC
HP NC7170 Dual Gigabit Server Adapter
HP NC7170 Dual Gigabit Server Adapter
HP NC3123 Fast Ethernet NIC
N/A
N/A
N/A
N/A
N/A
N/A
N/A
How can I tell the relevance to ‘quit’ once it finds the there is no NetConnectionID value? Looks like all adapters, even if they are disabled, are assigned a NetConnectionID (the label of the connection). I tried your above code and changed PhysicalAdapter to NetConnectionID but realized that would not work either since NetConnectionID is not a boolean. Any ideas? I am close here
q: string values of properties “Name” of (select objects (“Name, NetConnectionID FROM Win32_networkadapter”) of wmi) whose (exists string value of property “NetConnectionID” of it )
I just found out that the issue with the “Disabled Adapters not showing” is by design according to the Windows API that the Network Adapter uses… so this is a “feature” and not a bug…
rkc, you can use the below relevance to retrieve driver versions.
( ( value “DisplayName” of it as string ) & " # " & ( ( version of file ( pathname of windows folder & “” & ( value “ImagePath” of it as string ) ) ) as string )) of keys ( ( “HKLM\SYSTEM\CurrentControlSet\Services” & service key value name of it ) of active devices whose ( ( class of it = “Net” ) AND ( exists location information of it ) ) ) of registry as string