![]() Loading |
| VBScript |
| JavaScript |
| Powershell |
Search Options: List IP Addresses for a Computer
|
||
|
' Description: Returns the IP address for each IP-enabled network adapter installed in a computer.
strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set IPConfigSet = objWMIService.ExecQuery _ ("Select * 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 | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: | ||