We help IT Professionals succeed at work.

script powershell to get network card, ip address

bibi92
bibi92 asked
on
Hello,

i search a script powershell to get network card, ip address.

Thank you

Best

regards
Comment
Watch Question

Windows/Vmware
CERTIFIED EXPERT
Commented:
Get-NetIPAddress -AddressState Preferred -AddressFamily IPv4 | Select Name, IPAddress, PrefixLength

Open in new window

Author

Commented:
Hello,

Thank you, but I search to get network card name, ip adress and not the name of ip address.

Best regards
aravind ancheWindows/Vmware
CERTIFIED EXPERT

Commented:
Get-NetAdapterHardwareInfo -Name "*" | Format-List -Property "*"

Open in new window

Author

Commented:
PS C:\Windows\system32> $NetIPAddresses = (Get-NetIPAddress | where {$_.InterfaceAlias -match "01" -and $_.AddressFamily -eq "IPv4"}
) |  format-list IPAddress, InterfaceAlias
PS C:\Windows\system32> echo $NetIPaddresses