+4 votes
905 views
in Routers by (242k points)
reopened
Verify port open or closed command Windows PowerShell | Web, local IP, external IP

1 Answer

+5 votes
by (1.6m points)
 
Best answer

Command verify port open or closed Windows 10 with PowerShell

Viewing the status of the ports Windows 10 is one of the most common support tasks when the connection fails or when there is some kind of interference, this as a result of the ports allow communication with services and processes so that everything works as expected , Windows has thousands of ports to be used, some of the most used being:

 

Most popular ports

 

  • Port 21: FTP
  • Port 22: SSH and SFTP
  • Port 25: SMTP
  • Port 53: DNS
  • Port 80: HTTP
  • Port 443: HTTPS
  • Port 143: IMAP and many more

 

 

Port status
In Windows 10 it is possible to check the status of a port with the following conditions:

 

  • True: open
  • False: closed

 

 

 

 

This verification is possible thanks to the TNC command (Test-NetConnection) which displays diagnostic information for a connection, TNC supports ping tests, TCP tests, route tracing and route selection diagnostics. Let's see how to use TNC in Windows PowerShell to check the status of a port..

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

Command verify port open or closed Windows 10 with PowerShell

 

Step 1

The first thing is to access Windows PowerShell as administrators:

 

image

 

Step 2

Once we access the terminal we will execute the following for an external or web IP:
 tnc 178.33.118.246 -port 80 
Step 3

Pressing Enter will do the port status analysis:

 

 

image

 

 

Step 4

After the analysis we will see the result of the selected port:

 

 

image

 

 

Step 5

In this case it is True, that is, the port is active, we try another port. In this case this port is not active.
 tnc 178.33.118.246 -port 3380 
image

 

 

Step 6

We validate the SMTP port is active (open).
 tnc 178.33.118.246 -port 25 
image

 

 

Step 7

This process can be done with local IP addresses to see the precise results:
 tnc 192.168.20.21 -port 25 
image

 

 

With TNC and PowerShell we have the ability to see the status of a port in real time.

 


...