Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Associate a Network Connection and an IP AddressContent of Associate a Network Connection and an IP Address.vbsMD5 Hash: 72A19FC8CD744D9BAE3542B8F77DEAE8 |
||
strComputer = "."
strTargetAddress = "192.59.244.247" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True") For Each objItem in colItems arrIPAddresses = objItem.IPAddress For Each strAddress in arrIPAddresses If strAddress = strTargetAddress Then strMACAddress = objItem.MacAddress End If Next Next Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_NetworkAdapter Where MACAddress = '" & strMACAddress & "'") For Each objItem in colItems If Not IsNull(objItem.NetConnectionID) Then Wscript.Echo objItem.NetConnectionID End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |