Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Getting NIC's Mac and IP information

$
0
0

Hi I am looking to get a MAC address and an IP address of the NIC's for the machines that are listed in the servers.txt file... I am able to get the IP information, but no luck adding the MAC info... Anyone has any ideas of getting it done with PS3.0?

Here is my existing code -

Invoke-Command -ComputerName (Get-Content C:\test\PowerShell\servers.txt) -ScriptBlock { Get-NetAdapter | Get-NetIPAddress -AddressFamily IPv4 -ea 0 | Select-Object interfacealias, ipaddress } | sort-object -property PSComputerName | format-table PSComputerName, interfacealias, ipaddress -auto | Out-File -filepath \\xxx.xxx.xxx.xxx\c$\test\11.15.2013.txt



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>