win32_networkadapterconfiguration problem

  • Thread starter Thread starter OM
  • Start date Start date
O

OM

Hi,

I am trying to use the following code to retrieve the network adapter
information on remote computer. My problem is that some machines will
report 2 network adapters even there is only one in the network property
and device manager. The only thing I can think of is that these machines
have other network adapter installed before. Even though it was removed,
it still has its entry stored somewhere in the registry.

Can some advice how can this be fixed? Thanks

Set colItems = objsWbeMServices.ExecQuery ("Select * from
Win32_Networkadapterconfiguration where ipenabled=true")
For Each objItem in colItems
Wscript.Echo "Network Card: " & objItem.caption
Wscript.Echo "MAC address: " & objItem.macaddress
next
 
Back
Top