Command referenceGet-NetIPAddress
Get-NetIPAddress command (Windows / PowerShell)
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 / option | Meaning |
|---|---|
| -AddressFamily | Select IPv4 or IPv6. |
| -InterfaceAlias | Filter by friendly adapter name. |
| -IPAddress | Select a specific address. |
| -PrefixOrigin | Filter by DHCP, manual, router advertisement, or another origin. |
| -CimSession | Run 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.
Related commands
- Invoke-WebRequestSend HTTP and HTTPS requests and return response metadata and content.
- Where-ObjectFilter pipeline objects by property values or a script block predicate.
- ipconfigDisplay and manage Windows IP configuration and DNS client state.
- pingTest reachability and measure response time with ICMP echo requests.
- curlTransfer data to or from URLs using many network protocols.
- sshOpen a secure remote shell or run a command over SSH.
- pingTest IP reachability and measure round-trip response time.
- netstatDisplay active connections, listening ports, routing data, and protocol statistics.
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.