Network diagnostic cmdlets

A useful network troubleshooting cmdlet is Get-NetIPConfiguration which can be used to retrieve usable network interfaces, IP addresses, and DNS servers configured on a system. The key value of Get-NetIPConfiguration is that it gives you the “big picture” of the system’s network configuration in a concise way. For example, let’s see what happens when we run this command on HOST30 without any further options being specified:

PS C:\> Get-NetIPConfiguration

InterfaceAlias    : vEthernet (Broadcom NetXtreme Gigabit Ethernet #2 – Virtual Switch)
InterfaceIndex    : 18
InterfaceDescription : Hyper-V Virtual Ethernet Adapter #2
NetProfile.Name   :
IPv4Address     :
IPv6DefaultGateway  :
IPv4DefaultGateway  :
DNSServer      :
InterfaceAlias    : Ethernet
InterfaceIndex    : 12
InterfaceDescription : Broadcom NetXtreme Gigabit Ethernet
NetAdapter.Status  : Disconnected

To make things even easier, the alias GIP can be used instead of having to type Get-NetIPConfiguration at the command line. For example, let’s say we want to retrieve only the DNS Server configuration of the network adapter whose alias begins with “vEthernet” as shown above. Here’s how we can do this:

PS C:\> $a = GIP ‘v*’
PS C:\> $a.DNSServer

InterfaceAlias        Interface Address ServerAddresses PSComputerName Index   Family
————–        ——— ——- ————— ————–
vEthernet (Broadcom NetXt…    18 IPv6  {}
vEthernet (Broadcom NetXt…    18 IPv4  {}

The above tip was previously published in an issue of WServerNews, a weekly newsletter from TechGenix that focuses on the administration, management and security of the Windows Server platform in particular and cloud solutions in general. Subscribe to WServerNews today by going to and join almost 100,000 other IT professionals around the world who read our newsletter!

Mitch Tulloch is an eleven-time recipient of the Microsoft Most Valuable Professional (MVP) award and a widely recognized expert on Windows Server and cloud computing technologies.  Mitch is also Senior Editor of WServerNews. For more information about him see


About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top