Ping批量函数

function pingm ($file)
{
$ips = gc $file
foreach ($ip in $ips)
{
$cmdline +="ping " + $ip + " -n 1" + "`n"
}
return $cmdline
}
$m = pingm e:\ips.txt
$m
iex $m

posted on 2013-12-01 14:25  momingliu11  阅读(323)  评论(0编辑  收藏  举报