Read IP Configuration With Get-NetIPConfiguration

Get addresses, gateway and DNS for each interface as objects.

WindowsnetworkDNSadminpowershellLow risk
Run Get-NetIPConfiguration to list interfaces and their addressing details.

01Command

Command
$ Get-NetIPConfiguration

02What it does

Unlike ipconfig output, this cmdlet returns structured objects you can filter and format, so finding the adapter with a default gateway is a one-liner. That object model is what makes PowerShell configuration queries scriptable.

03Risk

RiskLow risk
RequirementsWindows 10/11 with PowerShell 5.1 or PowerShell 7+
!Warning: Windows can have several adapters, including virtual and VPN ones; check the InterfaceAlias to avoid reading the wrong one.

04Undo

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

05Sources

  • Get-NetIPConfiguration
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Retrieves IP configuration, including gateways and DNS servers.

Last verified: 2026-10-13 · Category: Network

06Related solutions