For decades, checking network settings, IP addresses, and DNS servers on Windows machines meant opening the Command Prompt and running ipconfig /all. While familiar to almost every user, ipconfig is an archaic legacy utility dating back to Windows NT. It outputs raw, unstructured text that cannot be cleanly filtered, sorted, or piped into modern automation pipelines without fragile regular expression parsing.
In Windows 11, PowerShell introduces the modern, object-oriented successor: the Get-NetIPConfiguration cmdlet (also available under the convenient alias gip). Part of the native NetTCPIP module, Get-NetIPConfiguration queries the Windows TCP/IP stack directly via CIM and WMI, returning structured .NET objects encompassing IPv4 and IPv6 addresses, default gateways, DNS resolvers, interface link speeds, and DHCP lease data. In this guide, you will learn how to use Get-NetIPConfiguration for fast network diagnostics, automated fleet auditing, and granular network troubleshooting in Windows 11.
Why Get-NetIPConfiguration Replaces ipconfig /all
Comparing the legacy tool with the native PowerShell cmdlet reveals significant administrative advantages:
- Structured Object Pipeline: Rather than plain text lines,
Get-NetIPConfigurationoutputs structured objects. You can immediately access properties such as$Config.IPv4DefaultGateway.NextHopor$Config.DNSServer.ServerAddresseswithout scraping strings. - Dual-Stack IPv4 and IPv6 Clarity: Adapters operating in dual-stack mode clearly distinguish between link-local IPv6 addresses, temporary privacy addresses, and static IPv4 allocations.
- Connected Interface Prioritisation: By default, running
Get-NetIPConfigurationfilters out inactive or unplugged adapters, focusing exclusively on operational network connections. - Fast Alias (gip): For interactive command-line use, typing
gipprovides instant network summaries faster than typingipconfig.
Step 1: Running a Quick Network Status Check
To inspect your current active network connections, open a standard PowerShell or Windows Terminal window and execute:
Get-NetIPConfiguration
Or simply use the shorthand alias:
gip
Windows 11 returns a clean summary block for each active network interface:
InterfaceAlias : Wi-Fi
InterfaceIndex : 14
InterfaceDescription : Intel(R) Wi-Fi 6E AX211 160MHz
NetProfile.Name : Office_Enterprise_5G
IPv4Address : 192.168.1.142
IPv6DefaultGateway : fe80::1
IPv4DefaultGateway : 192.168.1.1
DNSServer : 192.168.1.1
1.1.1.1
This report highlights your IP address, default router gateway, active Wi-Fi SSID network profile, and DNS servers in a fraction of a second.
Step 2: Inspecting All Adapters (Including Disconnected Interfaces)
By default, Get-NetIPConfiguration suppresses virtual adapters, disconnected Bluetooth links, and unplugged Ethernet jacks to reduce visual clutter. If you need a comprehensive audit of every physical and virtual network interface on the system, pass the -All parameter:
Get-NetIPConfiguration -All
This includes inactive Hyper-V virtual switches, disabled VPN tunnels, and standby mobile broadband interfaces.
Step 3: Retrieving Detailed Interface and DHCP Information
If you need deeper low-level diagnostics—including DHCP lease acquisition and expiry timestamps, NetBIOS settings, and WINS servers—use the -Detailed switch:
Get-NetIPConfiguration -Detailed
Under detailed mode, you can inspect:
- DHCP Lease Obtained: The precise date and time your router issued the dynamic IP lease.
- DHCP Lease Expires: When the host must renew its lease allocation.
- DHCP Server Address: The IP address of the local DHCP daemon servicing your subnet.
- CompartmentId: Network isolation compartments for enterprise and containerised workloads.
Step 4: Targeting a Specific Network Interface
If your computer has multiple active adapters (for example, simultaneous Ethernet and Wi-Fi connections, or active WSL virtual adapters), you can target a specific device using its InterfaceAlias or numeric InterfaceIndex:
# Target by human-readable adapter name
Get-NetIPConfiguration -InterfaceAlias "Ethernet"
# Target by interface index number
Get-NetIPConfiguration -InterfaceIndex 14
Step 5: Extracting Specific IP and DNS Values in Scripts
Because the cmdlet returns .NET objects, you can easily extract specific values into variables or format them into custom tables:
Extracting Just the Primary IPv4 Address:
(Get-NetIPConfiguration -InterfaceAlias "Wi-Fi").IPv4Address.IPAddress
Extracting Configured DNS Server IPs as an Array:
(Get-NetIPConfiguration -InterfaceAlias "Wi-Fi").DNSServer.ServerAddresses
Creating a Multi-Adapter Management Table:
Get-NetIPConfiguration | Select-Object InterfaceAlias, @{Name="IPv4";Expression={$_.IPv4Address.IPAddress}}, @{Name="Gateway";Expression={$_.IPv4DefaultGateway.NextHop}}, @{Name="DNS";Expression={$_.DNSServer.ServerAddresses -join ", "}} | Format-Table -AutoSize
Exporting Network Configuration Audits to CSV or JSON
For helpdesk tickets, disaster recovery inventories, or fleet management audits, export the system’s IP configuration directly to a structured file:
# Export to JSON
Get-NetIPConfiguration -Detailed | ConvertTo-Json -Depth 4 | Out-File "$HOME\Desktop\Network_Audit.json"
# Export flat summary to CSV
Get-NetIPConfiguration | Select-Object InterfaceAlias, InterfaceIndex, @{N='IPv4';E={$_.IPv4Address.IPAddress}}, @{N='Gateway';E={$_.IPv4DefaultGateway.NextHop}} | Export-Csv -Path "$HOME\Desktop\Network_Audit.csv" -NoTypeInformation
Troubleshooting Common Network Diagnostics Issues
- No Default Gateway Listed: If
IPv4DefaultGatewayis blank, the network adapter has not established a route to the outside world. This commonly occurs if DHCP failed and Windows assigned an Automatic Private IP Addressing (APIPA) link-local address in the169.254.x.xrange. - Multiple Gateways Causing Routing Conflicts: If you see default gateways assigned across both Wi-Fi and Ethernet simultaneously, Windows may attempt to route packets over the slower connection. Check the interface metric using
Get-NetIPInterfaceand adjust priorities accordingly. - DNS Resolution Stalls: If the
DNSServerfield lists multiple servers and the primary is offline, Windows will experience a multi-second delay while timing out before falling back to the secondary server. Test responsiveness usingTest-NetConnection -ComputerName <DNS_IP> -Port 53.
Frequently Asked Questions
Is Get-NetIPConfiguration available in standard Command Prompt (cmd.exe)?
No. Get-NetIPConfiguration and its alias gip are native PowerShell cmdlets. To run it from cmd.exe, you must invoke PowerShell: powershell -Command "Get-NetIPConfiguration".
Can I use Get-NetIPConfiguration to release and renew a DHCP lease?
While Get-NetIPConfiguration inspects lease information, renewing and releasing DHCP leases in PowerShell is handled via the companion NetAdapter cmdlets or CIM: (Get-CimInstance Win32_NetworkAdapterConfiguration | Where-Object { $_.DHCPEnabled }).RenewDHCPLease().
Does Get-NetIPConfiguration require Administrator privileges?
No. Inspecting network configurations with Get-NetIPConfiguration, -All, or -Detailed can be executed in standard, non-elevated user accounts. Administrative elevation is only required if you subsequently modify network adapter properties or static IP assignments.
Can I run Get-NetIPConfiguration against remote computers?
Yes. By utilising PowerShell Remoting (WinRM), you can run: Invoke-Command -ComputerName "WORKSTATION-01" -ScriptBlock { Get-NetIPConfiguration } to inspect the network status of remote workstations across your corporate domain.