List IP addresses and lease origins on Windows (Get-NetIPAddress)

Dump every configured IP address with prefix length and how it was assigned (DHCP, manual, APIPA) as filterable PowerShell objects.

WindowsnetworkpowershellipconfigLow risk
Run Get-NetIPAddress -AddressFamily IPv4 to see each interface's address, prefix length and assignment origin.

01Command

Command
$ Get-NetIPAddress -AddressFamily IPv4 | Format-Table InterfaceAlias,IPAddress,PrefixLength,PrefixOrigin,SuffixOrigin -AutoSize

02What it does

Beyond what ipconfig prints, Get-NetIPAddress exposes PrefixOrigin and SuffixOrigin (Dhcp, Manual, Other), which tells you instantly whether an address came from DHCP or was set by hand — Other on a DHCP interface means APIPA 169.254 fallback. PrefixOrigin is the quick diagnosis when 'I didn't set a static IP' arguments start. Its counterpart New-NetIPAddress / Set-NetIPAddress configures addresses statically.

03Risk

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Get-NetIPAddress | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Get-NetIPAddress as retrieving IP address configuration including address, prefix length, and origin/valid lifetime properties.

Last verified: 2026-09-17 · Category: Network

06Related solutions