With Windows 8.1 and Windows Server 2012, R2 Microsoft released PowerShell v4 with new PowerShell modules and new PowerShell cmdlets. One of them is the new Test-NetConnection cmdlet, which does replace some simple network tools like Ping, Traceroute, port scanner, and more.
First, if you just run Test-NetConnection, this will check a Microsoft edge server and will tell you if your internet is working or not.
You can also ping other servers.
If we have a closer look at this cmdlet, we can see that we can do much more.
What we can do is something like a port scan. In this example, I check if the RDP port is open on my webserver. Which is hopefully not ;-)
Test-NetConnection thomasmaurer.ch -CommonTCPPort RDP
You can also check for not so common ports by using the -Port parameter and entering the port number.
Another thing you could do would be a simple traceroute.
Test-NetConnection thomasmaurer.ch -TraceRoute
If you want to do a ping -t you could use the following command
while ($true) {Test-NetConnection -InformationLevel Quiet}
I hope this helps you a little :)
Find more networking PowerShell cmdlets in my PowerShell Networking cheatsheet.









