Get-NetIPAddress
List local IP addresses
Get-NetIPAddress -AddressFamily IPv4 | Select-Object InterfaceAlias, IPAddress
- Works on
- Windows
- PowerShell
- 5.1 and later
- Reference
- Microsoft Learn: Get-NetIPAddress
Windows-only (NetTCPIP module). Filter with -AddressFamily IPv4 to skip IPv6 link-local noise.
Try this
Get-NetIPAddress -AddressFamily IPv4 | Where-Object IPAddress -notlike '169.254*'
Coming from another shell
| Shell | What you might type |
|---|---|
| bash / zsh | ip addr |
| cmd.exe | ipconfig |
More in From bash and From cmd.