title: loop until IP:port is responding
body: <p>I have a simple inquire but test-netConnection or test-connection are giving me a hard time while used in a loop.
  So basically I want to run in a loop until a server is responding to my connection attempt on a certain port.
  With test-connection I see that you cannot specify a port, so the solution I guess is to use tnc - test-netconnection. </p>
  
  <p>In a do while loop it doesn't work as tnc doesn't use a continuous ping/connect attempts.</p>
  
  <pre><code>do {
    Write-Host "waiting..."
    sleep 3      
  } until(Test-NetConnection $HOST -Port PORT)
  </code></pre>