Categories
Uncategorized

How to make ping script with powershell

Easy ping command is “ping IPadress” but this command always doesn’t satisfy every need, If you want multiple to ping, script is below:

script download

those scripts written by Halil İbrahim ÖKSÜZ

first scripts start from 0, counter one by one to 1

for ($i=0; $i-lt2; $i++)
{

ping 1.1.1.$i
}

second scripts start from 1, counter one by one to 2

for ($i=1; $i-le2; $i++)
{

ping 1.1.1.$i
}

third scripts start from 2, counter two by two to 4

for ($i=2; $i-le4)
{

ping 1.1.1.$i
$i=$i+2
}

fifth scripts first of all $z variable start from 1, counter one by one to 2 and than $i variable start from 1, counter one by one to 2

for ($i=1; $i-le2; $i++)
{

for ($z=1; $z-le2; $z++)
{

ping 1.1.$i.$z

}

}