Read IP Configuration With Get-NetIPConfiguration
Get addresses, gateway and DNS for each interface as objects.
01Command
$ Get-NetIPConfiguration02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Get-NetIPConfigurationEvidence: Retrieves IP configuration, including gateways and DNS servers.
Last verified: 2026-10-13 · Category: Network
06Related solutions
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.
Purge cached DNS lookups so Windows re-resolves hostnames from scratch — the fix for 'the new server is live but my browser still hits the old one'.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.