SUPERPING – POWERSHELL TEST-NETCONNECTION
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 basically replaces some simple network tools like Ping, Traceroute, Portscanner 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
1
|
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.
1
|
Test -NetConnection thomasmaurer.ch -TraceRoute |
If you want to do a ping -t you could use the following command
1
|
while ( $true ) {Test -NetConnection -InformationLevel Quiet} |
I hope this helps you a little