During troubleshooting of different issues it is often required to check if some TCP port on a remote host is opened and ensure that it is not blocked by a firewall.
The most common tool for this is telnet, but it may not be installed or you may want to be able to copy the output to paste it into a ticket or to send it someone, that is not always possible with telnet.
Also the telnet command is not very handy if you need to check connectivity to multiple hosts/ports, but you can do this easily with a PowerShell.
In Windows, you can test connection to TCP port from the command line using PowerShell and in this note i will show how to do this. (more…)