I want to get a list of all the interfaces, IP and MAC address on a machine. I have quite a few machines to get this information from (around 600) and I can\'t use a batch f
asked: I can't use a batch file on the devices. I would like to send the command and get back an echoed output.
my solution try to use a single commands row.
Also I use 2 loops to better refine the data search.
so try this solution too:
@for /f "skip=2 delims=, tokens=1,2,3,4" %L in ('wmic nic where "netenabled=true" get macaddress^,index^,netconnectionid^,productname /format:csv') do @for /f "skip=2 delims={}, tokens=2" %A in ('wmic nicconfig where "index=%M" get ipaddress^,ipsubnet ^/format:csv') do @echo %L - %O - %N - %A