On recent Windows systems, the telnet utility is not installed by default. This tool usually allows you to test the ports to the server, e.g. whether the FTP port is open. However, with the help of the Test-NetConnection command, we can also check whether a given port is open when performing a ping.
Of course, the command takes an IP address, checks which interface the ping comes from and whether the ping was successful.
When we add the "-InformationLevel Detailed" parameter, we'll get more information.
After adding the -Port parameter and the port number, we check if the port is open or not. In the case of Google.com, port 80 is open and port 21 is closed.
GeekITSupport | BLOG