Test Port using Windows

- Words
2024-12-12

Context: Not sure if a service or a Port or a Service is successfully running on a remote machine.

Resolution: Use Test-NetConnection in Powershell to test port

 

While Nmap is an option, Test-NetConnection comes native with powershell on a windows computer.

Command structure:

Test-NetConnection -ComputerName <hostname_or_ipaddress> -Port <port>

 

This will ping and also return if the port is open, or not.

Example successful and failed outputs.

 


Jozef
Author