tcp connection test
Test-NetConnection -ComputerName localhost -port 8899 -InformationLevel "Detailed"
test tcp port
$dst="localhost"
$port=8899
Test-Connection -TargetName $dst -TcpPort $port
Test-NetConnection -ComputerName localhost -port 8899 -InformationLevel "Detailed"
$dst="localhost"
$port=8899
Test-Connection -TargetName $dst -TcpPort $port