Test-NetConnection <ホスト名 or IPアドレス> -port <ポート番号>
実行例1
当サイト(win2012r2.com)の 443番 ポートが開放されているか調べる場合は…
> Test-NetConnection win2012r2.com -port 443
ComputerName : win2012r2.com
RemoteAddress: 49.212.180.105
RemotePort: 443
InterfaceAlias: イーサネット
SourceAddress: 192.168.8.100
TcpTestSucceeded: True
「TcpTestSucceeded」が 「True」 になっているので、443番ポートと通信できています。
実行例2
当サイト(win2012r2.com)の 23番 ポートが開放されているか調べる場合は…
> Test-NetConnection win2012r2.com -port 23
警告: TCP connect to (49.212.180.105 : 23) failed
ComputerName : win2012r2.com
RemoteAddress: 49.212.180.105
RemotePort: 23
InterfaceAlias: イーサネット
SourceAddress: 192.168.8.100
PingSucceded: True
PingReplyDetails (RTT) : 63 ms
TcpTestSucceeded: False
「TcpTestSucceeded」が 「False」になっているので、23番ポートとの通信に失敗しています。
※「PingSucceded」が 「True」になっているので、普通の ping (ICMP) には成功しています。
以上。
コメント