* Ping送信 - Test-Connection [#q0c23aec]

 $ips = @('192.168.0.1','192.168.0.2','mypc1')
 $max = 10; while ($max--) { foreach ($ip in $ips) { Test-Connection -Count 1 $ip } }

*** Test-Connectionの注意点 [#c42bde79]
- システムに負担が掛かり、遅い。
- したがって、長時間実行する場合は、Test-Connectionコマンドレットではなく、DOSのping.exeコマンドを使った方が良い。
- ping.exeの機能が足りない場合は、Sysinternalsのpsping.exeを使うといい。

** 参考 [#j8562c38]
- https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.management/test-connection
- http://stknohg.hatenablog.jp/entry/2016/06/16/231239

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS