Skip to main content

Command referenceGet-NetIPAddress

Get-NetIPAddress command (Windows / PowerShell)

WindowsPowerShellnetworkintermediate

What it does

Retrieve IP address configuration from Windows network interfaces. Guides covering the get-netipaddress powershell usually need pipeline-friendly examples, common parameters, and how the cmdlet compares with classic CMD or Linux tools. This page includes syntax, options, and copyable PowerShell examples.

Retrieve IP address configuration from Windows network interfaces.

Syntax

Get-NetIPAddress [[-IPAddress] <String[]>] [-InterfaceAlias <String[]>] [-AddressFamily <AddressFamily>] [-PrefixOrigin <PrefixOrigin>]

Common options

Flag / optionMeaning
-AddressFamilySelect IPv4 or IPv6.
-InterfaceAliasFilter by friendly adapter name.
-IPAddressSelect a specific address.
-PrefixOriginFilter by DHCP, manual, router advertisement, or another origin.
-CimSessionRun through a local or remote CIM session.

Practical examples

IPv4 addresses

Get-NetIPAddress -AddressFamily IPv4

Returns configured IPv4 address objects.

Ethernet adapter

Get-NetIPAddress -InterfaceAlias 'Ethernet'

Filters by adapter alias.

Usable addresses

Get-NetIPAddress -AddressFamily IPv4 | Where-Object AddressState -eq Preferred

Selects preferred IPv4 addresses.

Linux ↔ Windows equivalent

Closest match: ipconfig (Windows / CMD). Display and manage Windows IP configuration and DNS client state.

Common mistakes

  • Treating link-local or loopback addresses as externally reachable.
  • Expecting this read command to renew DHCP leases.

FAQ

What does Get-NetIPAddress do in PowerShell?

Retrieve IP address configuration from Windows network interfaces.

How can I see examples for Get-NetIPAddress?

Run `Get-Help Get-NetIPAddress -Examples`, then adapt an example to the provider and objects you are using.

What is a practical Get-NetIPAddress example?

Try `Get-NetIPAddress -AddressFamily IPv4` — Returns configured IPv4 address objects.

Does Get-NetIPAddress return text or objects?

Get-NetIPAddress normally participates in PowerShell's object pipeline; formatting seen in the console is a view of those objects.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.