win32_networkadapterconfiguration problem

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top