Use
Test-NetConnection to check whether a
TCP port of a remote host is open - 05/Oct/2024
You can use PowerShell to check whether a TCP port is responding in the network. To do this, open a PowerShell window and enter the Test-NetConnection command using the following syntax:
RemoteAddress :
10.4.1.4 RemotePort
: 443 InterfaceAlias : Ethernet SourceAddress : 10.4.3.1 TcpTestSucceeded : True |
The TCP port check is also often referred to as TCP ping, although the term is actually incorrect.
Short form
PS C:\> tnc MyServer -Port 443
You can also omit the keyword “ComputerName”.
If the port is also omitted, a ping is executed:
RemoteAddress :
10.4.1.4 InterfaceAlias : Ethernet SourceAddress : 10.4.3.32 PingSucceeded : True |
If you want to run the command as a ping permanently (endless), the following one-liner is used:
True
True
True
True
False
False
True
True
|
Problem with the Test-NetConnection command: It takes a relatively long time, especially if the port does not respond.
PortCheck tool features:
Displays permanently whether a TCP port is open or not
Shows response time in milli seconds with colored output (red/green)
Checks multiple devices simultaneously on multiple ports
Permanent logging with date and time possible
Acoustic signal if TCP port is not responding
...
PortCheck is the perfect tool for administrators, network and firewall admins. You can read more about the TCP Port Check Tool for Windows 11 here. You can also find many examples there.
If you would lik
PingTool features:
Shows permanently the status of network devices (red/green)
IP range scan - with vendors and MAC addresses
Checks if remote devices answer on particular TCP ports
Integrated speed test to determine the network bandwidth
Mail notification in the event of failure
...
To check TCP ports, simply enter the TCP port
number. Without port number, an
ICMP ping will be performed. You can read more about the free
Ping Tool here
Often used standard TCP ports
A list of important TCP ports with port number: