Windows10/相手の端末のポートオープン状態を確認する
PowerShell で特定 TCP ポートが開いているか確認する方法は以下の通り。
コマンド †
Test-NetConnection [ターゲット] -Port [ポート番号]
実行例 †
失敗時 †
>Test-NetConnection 192.168.0.33 -Port 5432 警告: TCP connect to (192.168.0.33 : 5432) failed ComputerName : 192.168.0.33 RemoteAddress : 192.168.0.33 RemotePort : 5432 InterfaceAlias : Wi-Fi SourceAddress : 192.168.0.38 PingSucceeded : True PingReplyDetails (RTT) : 1 ms TcpTestSucceeded : False
成功時 †
>Test-NetConnection 192.168.0.33 -Port 5432 ComputerName : 192.168.0.33 RemoteAddress : 192.168.0.33 RemotePort : 5432 InterfaceAlias : Wi-Fi SourceAddress : 192.168.0.38 TcpTestSucceeded : True
このページのURL: