Using the PowerShell Test-NetConnection Cmdlet on Windows
Before 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.