Get NetIPAddress - PowerShell


Get-NetIPAddress retrieves information about the network IP addresses assigned to a specified network interface or all interfaces on a local computer. It provides detailed data on IP addresses, network adapters, IP configurations, and related network properties.


Get-NetIPAddress [-InterfaceAlias <string>] [-Confirm] [-OutFile <string>]
[-OutVariable <string>] [<CommonParameters>]


  • -InterfaceAlias: Specifies the network interface alias to retrieve information for.
  • -Confirm: Prompts for confirmation before deleting an IP address.
  • -OutFile: Saves the output to a specified text file.
  • -OutVariable: Stores the output in a specified variable.


Get IP addresses for a specific interface:

Get-NetIPAddress -InterfaceAlias "Ethernet"

Get all IP addresses on the local computer:


Save IP address information to a file:

Get-NetIPAddress -OutFile "IPAddresses.txt"

Common Issues

  • Missing interface alias: Ensure the specified interface alias is valid. use Get-NetAdapter to list available interfaces.
  • Access denied: Verify you have sufficient privileges to run the command.


Get network connectivity status:

Get-NetIPAddress | Test-NetConnection

Configure network adapter IP settings:

Get-NetIPAddress -InterfaceAlias "Ethernet" | Set-NetIPConfiguration
  • Get-NetAdapter: Retrieves information about network adapters.
  • Set-NetIPAddress: Modifies or sets IP addresses on network interfaces.
  • New-NetIPAddress: Creates new IP addresses on specified interfaces.