PowershellでTCP接続可能になるまで待ちたい

wait.ps1
$dstHost = 'szk302.dev'
$dstPort = 443
$maxRetryCount = 2
$count = 0

while (-not (Test-NetConnection -ComputerName $dstHost -Port $dstPort -InformationLevel Quiet) -and ($count -lt $maxRetryCount)) {
    Write-Host "Retry NetConnection"
    $count+=1
}