Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple IP address

Status
Not open for further replies.

guest999

Programmer
Feb 8, 2006
2
0
0
AU
Hi,

I am trying to write a vbscript which report how many network card installed, and the IP address assigned to the NIC on every machine.

Can someone please tell me what is the registry in Windows NT which indicate how many NIC card installed on the machine or What is the best way to complete my task.

I use the key below to locate the IP address for the machine with single NIC card installed.
SHShell.RegRead(
 
set IPConfigSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
("select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

for each IPConfig in IPConfigSet
if Not IsNull(IPConfig.IPAddress) then
for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)
wscript.echo IPConfig.IPAddress(i)
next
end if
next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top