Forum Discussion

vishwas_n's avatar
vishwas_n
Occasional Contributor
12 years ago
Solved

IP Address fetching for remote machine using C#Script

Fellas,



Am using this piece of code to fetch the IP ...



wmiServ["ExecQuery"]("SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = 'True'");



Which is returning 'null'

I tried with given my NIC card description with no imprvements.

\

wmiServ["ExecQuery"]("SELECT IPAddress FROM Win32_NetworkAdapterConfiguration where IPEnabled='True' and Description ='Intel(R) 82579LM Gigabit Network Connection'");



Help this novice guys ...