Jere's Techblog

Test TCP Networkports with Powershell

http://portquiz.net/ is a great Website to test any outbound TCP Port.

Of course there are a lot Programm who can check which TCP Ports are open. But i’ll show you a way how you can test the Ports with Powershell.
$16bitint = 1..65535 
foreach ($port in $16bitint) {
    IF (Test-NetConnection -ComputerName portquiz.net -InformationLevel Quiet -Port $port){
          Write-Host $port 
    } 
}

Leave a Reply