En corto

Sin nc en Windows: Test-NetConnection -ComputerName host -Port puerto. Mira TcpTestSucceeded.

En Linux el reflejo para “¿está abierto el 1433?” es:

1
nc -v db.example 1433

En Windows no hay nc de serie. El equivalente más cercano en PowerShell es probar si el puerto TCP acepta conexión:

1
Test-NetConnection -ComputerName db.example -Port 1433

Alias corto:

1
tnc db.example -Port 1433

Qué mirar

TcpTestSucceeded:

ValorSignificado
TrueEl puerto está abierto y responde (como cuando nc conectó)
FalseNo hay conexión (firewall, servicio caído, IP inalcanzable)

Más detalle, al estilo nc -v:

1
Test-NetConnection -ComputerName db.example -Port 1433 -InformationLevel Detailed

Solo el puerto, sin ping

Test-NetConnection también hace ICMP por defecto. Si solo quieres el TCP:

1
2
Test-NetConnection -ComputerName db.example -Port 1433 -WarningAction SilentlyContinue |
  Select-Object ComputerName, RemoteAddress, RemotePort, TcpTestSucceeded

PowerShell muy viejo

Si Test-NetConnection no existe, el cliente TCP de .NET:

1
2
3
4
5
6
7
8
9
$tcp = New-Object System.Net.Sockets.TcpClient
try {
    $tcp.Connect("db.example", 1433)
    Write-Host "Conectado a db.example:1433"
} catch {
    Write-Host "Fallo: $($_.Exception.Message)"
} finally {
    $tcp.Close()
}