One more useful feature offered by Test-NetConnection cmdlet is its built-in ability to trace the route to a remote computer.
If you are wondering on how to run a continuous ping in PowerShell, checkout this article. This command will return the PingSucceeded and Round Trip Time (RTT) in output. If you want to test the regular ping connectivity to a remote computer, just omit the -Port parameter and use the command as shown below: Test-NetConnection -ComputerName Using Test-NetConnection as the Ping alternative You could even use it as an alternative of Ping command or as an alternative of the Tracert command. You just saw how to use the Test-NetConnection cmdlet as an alternative of Telnet command. This command will return only True or False in output. If you’re interested in adjusting the information level this command produces, you could add -InformationLevel parameter with either “ Quiet” or “ Detailed” values.įor instance, to see the test result only, you could use the same command as: Test-NetConnection -ComputerName -Port 443 -InformationLevel Quiet Maybe server isn’t listening on that port or your connection attempt is blocked. If you see TcpTestSucceeded : False, it means something is wrong.
The TcpTestSucceeded : True in output means the remote server is listening on that port and your system can reach it on that TCP port. By default, it gives you the information about remote server (by doing the name resolution), the name of source interface and it’s IP address. The above command tests the connectivity of your local computer with domain name on TCP port 443. See the following screenshot for reference: Using Test-NetConnection cmdlet as the Telnet alternative Where the -ComputerName parameter is used to specify the name (or IP address) of remote computer and -Port parameter is used to specify the TCP port that you want to test the connectivity for. Test-NetConnection -ComputerName -Port 443