PowerTip: Use PowerShell to Find IP Config of Adapter

Summary: Use Windows PowerShell 3.0 in Windows 8 to find the IP configuration of a specifically named IP adapter.

Hey, Scripting Guy! Question How can I use Windows PowerShell 3.0 in Windows 8 to easily find the IP address configuration of a network adapter named External Ethernet Apapter?

Hey, Scripting Guy! Answer Use a wildcard character with the Get-NetAdapter function and pipe the results to the Get-NetIPAddress function:

Get-NetAdapter -Name *external* | Get-NetIPAddress

Comments (3)

  1. Shawne Beeson says:

    Ok now how can I program a nic so it promtes me for the IP, subnet , gateway?

  2. Ed Wilson says:

    You can disable APIPA on your computer. This would prevent getting the 169.x.x.x address, but it would not prompt for an address. But it would be a start. Here is some information that might help with that: answers.microsoft.com/…/1c9044d2-85a5-4cb2-ba90-ff6866a4adb1

  3. If you only want IPV4 addresses:

    Get-NetAdapter | ? status -eq ‘up’ | Get-NetIPAddress -ErrorAction 0 | ? PrefixOrigin -eq ‘Manual’ | ft interfacealias, ipaddress -a

Skip to main content