Using the PowerShell Test-NetConnection Cmdlet on Windows

ipswitchBefore the days of PowerShell Test-NetConnection, we had many different command-line tools we could choose from to troubleshoot various network connectivity issues. We had ping for testing ICMP echoes and replies; tracert to see where our packets might be getting dropped; nslookup to perform DNS queries against our DNS servers; telnet to check for open TCP ports; and various other utilities. There was a utility for everything.

With the introduction of PowerShell v4 on Windows 8.1 and Windows Server 2012 R2, this single-utility-for-a-single-task approach to troubleshooting connectivity problems has become obsolete. Allow me to introduce you to the new, all-powerful cmdlet that is PowerShell Test-NetConnection. Think of PowerShell Test-NetConnection as ping, tracert, nslookup, telnet and a few other utilities wrapped up into one suite of troubleshooting goodness.

How to Troubleshoot a Network Connectivity Problem with Test-NetConnection

Let’s see what we can do with the PowerShell Test-NetConnection cmdlet and look at how we can use it when we’re in the unfortunate position of troubleshooting a network connectivity problem. To demonstrate this, I’m going to use PowerShell Test-NetConnection to troubleshoot a common, real-world problem: “I can’t get to XYZ website!” …

Read the full article at Ipswitch.

Adam Bertram

Adam Bertram

Chief Automator at Adam the Automator, LLC
Adam Bertram is an independent consultant, technical writer, trainer and presenter. Adam specializes in consulting and evangelizing all things IT automation mainly focused around Windows PowerShell. Adam is a Microsoft Windows PowerShell MVP, 2015 PowerShell hero and has numerous Microsoft IT pro certifications. He authors IT pro course content for Pluralsight, is a regular contributor to numerous print and online publications and presents at various user groups and conferences.You can find Adam here on the blog or on Twitter at @adbertram.
Adam Bertram

Latest posts by Adam Bertram (see all)

Leave a Reply