Windows 10

Windows 10 Networking Powershell commandlets

Windows 10 Networking Powershell commandlets

With Windows 10 we have all the goodness of powershell baked into the operating system and with that, there are several really great powershell commandlets that can be used to take control of the networking components of your Windows 10 workstation.

Display information about your IP address

Get-NetAdapter

The Get-NetAdapter cmdlet displays basic network adapter properties.

Get-NetAdapter

It is similar to the following netsh command:

netsh interface show interface

win10psnet02

win10psnet01

Get-NetIpAddress

The Get-NetIPAddress cmdlet gets the IP address configuration, v4 addresses, v6 addresses and interfaces.

Get-NetIpAddress

win10psnet03

This is not really a replacement for ipconfig as there are no switches for renewing the IP address or clearing DNS cache, etc.

Get-NetIPConfiguration

The Get-NetIPConfiguration cmdlet gets network configuration, usable interfaces, IP addresses, and DNS addresses.

Get-NetIPConfiguration

win10psnet04

Same as above – not a replacement for ipconfig but definitely a great powershell IP Address tool.

Test-NetConnection

This is a great tool for general Internet connectivity testing. ย It provides diagnostic information for a connection including results of a DNS lookup, a listing of IP interfaces, testing capabilities and confirmation. ย If you don’t supply parameters, it tests general connectivity to the hostย internetbeacon.msedge.net

Test-NetConnection

Another really nice feature of this powershell cmdlet is that you can also test a specific port. ย For instance:

Test-NetConnection -port 25 -computer mymailserver

This is a great troubleshooting tool to add to the mix especially if you have general icmp connectivity but don’t know if you have connectivity to a certain port such as SMTP, RDP, HTTP, etc.

Test-Connection

The Test-Connection cmdlet sends ICMP packets to one or more remote computers. ย The nice thing is you can specify more than one remote computer. ย This cmdlet has tons of options from packetintegrity, buffersize, count, delay, impersonation, etc.

Test-Connection server1, server2

win10psnet07

One of the really cool things you can do with this cmdlet is specify the source computer. ย So if the need arises to troubleshoot traffic flow coming from another computer to a target, you can specify the source parameter

test-connection -source computer1 targetcomputer

Related command line utility:

ping

Get-NetConnectionProfile

Have you ever wonder when running Windows firewall and possibly multiple network adapters which firewall profile applies to which adapter? ย The Get-NetConnectionProfile cmdlet gets a connection profile associated with configured network adapters.

Get-NetConnectionProfile

win10psnet08

Get-NetRoute

This is the powershell equivalent toย route print command line tool. ย It is used in conjunction with the Set-NetRouteย command.

Get-NetRoute

win10psnet09

Final Thoughts

These are just a handful of the commands I have found to be very useful in the powershell world for gathering and manipulating network configuration in Windows 10. ย Combining these tools with more advanced looping and pipe lining and you can do just about anything.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.