Replace Telnet with Test-NetConnection PowerShell Module

Replace Telnet with Test-NetConnection PowerShell Module

While troubleshooting some issues for a client this week I needed to test that a port was open. Traditionally our first step for this would to reach for Telnet. But given it is 2016 and telnet has been a feature that has been intentionally removed by default from all Windows OS for the last 4 years as a result of the security concerns, I don’t have it enabled on my laptop.  

So, the question is if not Telnet what do I use for testing a port? Well the easy answer is: PowerShell

The CmdLet in question is “Test-NetConnection” sounds like it would just do a ping, which doesn’t really help me right? Well that’s true, but you can then use the -Port parameter which allows you to define the port which you wish to send the packet down to test that the port is open.

Here is an example of how to use the command. The first usage in the image is a failed reply, while the second usage is a successful response.


Good Luck.


Leave a Reply