Would you like to learn how to test the TCP port connectivity using Powershell? In this tutorial, we are going to show you how to use Powershell to test the TCP connection to remote hosts.
• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
Equipment list
The following section presents the list of equipment used to create this tutorial.
As an Amazon Associate, I earn from qualifying purchases.
Related tutorial – PowerShell
On this page, we offer quick access to a list of tutorials related to PowerShell.
Tutorial Powershell – Test the TCP port connectivity
As an Administrator, start a new POWERSHELL command-line prompt.
Test the connectivity to the TCP port using Powershell.
Here is the command output.
Test the connectivity to the TCP port using the quiet mode.
Here is the command output.
Test the connectivity to the TCP port using older Powershell versions.
Here is the command output.
Measure the response time of the connectivity to the TCP port.
Here is the command output.
Measure the response time of the connectivity to the TCP port using older Powershell versions.
Here is the command output.
Congratulations! You are able to test the TCP port connectivity using Powershell.
Tutorial Powershell – Test the TCP port connectivity using a script
As an Administrator, start a new POWERSHELL command-line prompt.
Create a text file containing the IP list or hostnames.
Create a text file containing the desired TCP ports.
Test the connectivity to the TCP ports using a Powershell script.
Here is the command output.
Congratulations! You are able to test the TCP port connectivity using a Powershell script.