「PowerShell」特定IPアドレスのポート番号を指定してPingする

2021年10月25日

操作方法
1.Windowsアイコンを右クリックし、「Windows PowerShell(管理者)(A)」を起動する

2.以下のコマンドを実行する
書式
Test-NetConnection IPアドレス  -port ポート番号
操作例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
PS C:\> Test-NetConnection 192.168.1.101 -port 1521
ComputerName : 192.168.1.101
RemoteAddress : 192.168.1.101
RemotePort : 1521
InterfaceAlias : Wi-Fi
SourceAddress : 192.168.1.15
TcpTestSucceeded : True
PS C:\> Test-NetConnection 192.168.1.101 -port 1521 ComputerName : 192.168.1.101 RemoteAddress : 192.168.1.101 RemotePort : 1521 InterfaceAlias : Wi-Fi SourceAddress : 192.168.1.15 TcpTestSucceeded : True
PS C:\> Test-NetConnection 192.168.1.101 -port 1521


ComputerName     : 192.168.1.101
RemoteAddress    : 192.168.1.101
RemotePort       : 1521
InterfaceAlias   : Wi-Fi
SourceAddress    : 192.168.1.15
TcpTestSucceeded : True

3.結果確認
TcpTestSucceeded True Ping成功
False Ping失敗

PowerShell

Posted by arkgame