' Collection of code snippets by Arne Vajhøj ' posted to eksperten.dk, usenet and other places (2002-now) Set wmi = GetObject("winmgmts:") Set nics = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True") For Each nic In nics WScript.Echo nic.ServiceName & " " & nic.MACAddress & ":" If Not IsNull(nic.IPAddress) Then For Each ip In nic.IPAddress WScript.Echo " " & ip Next End If Next Set nics = Nothing Set wmi = Nothing