View interface IP settings and metrics on Windows (Get-NetIPInterface)

See per-interface DHCP state, automatic metrics and MTU — the layer between adapters and IP addresses that explains why traffic leaves one NIC.

WindowsroutingnetworkpowershellLow risk
Run Get-NetIPInterface -AddressFamily IPv4 to list each interface's DHCP state, metric and connection status.

01Command

Command
$ Get-NetIPInterface -AddressFamily IPv4 | Sort-Object InterfaceMetric | Format-Table InterfaceAlias,InterfaceMetric,Dhcp,ConnectionState -AutoSize

02What it does

Windows picks which NIC handles traffic by the lowest InterfaceMetric, and Get-NetIPInterface is the forgotten cmdlet that reveals those numbers — invaluable when a VPN steals the default route. Set-NetIPInterface lets you adjust -InterfaceMetric or disable router discovery per interface. It is the modern replacement for 'netsh interface ipv4 show interfaces'.

03Risk

RiskLow risk

04Undo

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

05Sources

  • Get-NetIPInterface | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents Get-NetIPInterface as retrieving IP interface properties including InterfaceMetric, Dhcp, NeighborDiscovery and MTU settings.

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

06Related solutions