Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Need Help with WMI Query (Win32_NetworkAdapter)

$
0
0

Not sure how to do this - been digging in the forums but no exp. with SQL queries. I'm sure this is probably very simple...

What I'm trying to do is lookup the Win32_NetworkAdapter NetConnectionID object based on an IP address. I'm thinking the way to do that would be with two queries, first by looking up the Win32_NetworkAdapterConfiguration MACAddress from the IP and then use the MACAddress to get the Win32_NetworkAdapter NetConnectionID since both Win32_NetworkAdapterConfiguration and Win32_NetworkAdapter have the MAC.

 

This obviously isn't right:

$colItems = $objWMIService.ExecQuery('SELECT * FROM Win32_NetworkAdapterConfiguration Where $objItem.IPAddress = $IPAddress', "WQL")

Anybody have some good references for structuring such queries or how to do this ?

 

Thanks!

 

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>