' Pandora FMS Agent Inventory Plugin for Microsoft Windows (All platfforms) ' (c) 2015 Borja Sanchez ' This plugin extends agent inventory feature. Only enterprise version ' -------------------------------------------------------------------------- on error resume next 'WMI real interfaces info ' exlusions: ' VBox network interfaces ' VMWare network interfaces ' 'nic where "guid is not null and not PNPDeviceID like 'ROOT%'" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "NIC" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colAdapters = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter " & _ "Where not PNPDeviceID like 'ROOT%%' " & _ "and not PNPDeviceID like 'SW%%' " & _ "and not ServiceName is null " & _ "and not ServiceName like 'vwifimp' ") For Each iface In colAdapters ' return model MACAddress IPAddress set ifaces_cfg = objWMIService.ExecQuery("Select ipaddress from Win32_NetworkAdapterConfiguration Where Caption='" & iface.caption & "'") Wscript.StdOut.Write " "" ) then Wscript.StdOut.Write trim(iface_cfg.IPAddress(0)) end if next wscript.stdOut.WriteLine "]]>" Next Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine "" Wscript.StdOut.WriteLine ""