tag:blogger.com,1999:blog-15559937.post6184149036633539031..comments2024-02-19T07:53:28.238-05:00Comments on Plain Text Prose: ping sweeping with FOR statements …Marcus Ohhttp://www.blogger.com/profile/16669592705989568859noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-15559937.post-10647106668751292522008-10-08T15:21:00.000-05:002008-10-08T15:21:00.000-05:00thanks aleksandar... i totally forgot about that o...thanks aleksandar... i totally forgot about that one. :)Marcus Ohhttps://www.blogger.com/profile/16669592705989568859noreply@blogger.comtag:blogger.com,1999:blog-15559937.post-9202717564730813002008-10-08T14:33:00.000-05:002008-10-08T14:33:00.000-05:00Or, we can use the numeric range operator (..) ins...Or, we can use the numeric range operator (..) instead:<BR/><BR/>$ping = New-Object System.Net.NetworkInformation.Ping<BR/><BR/>1..255 | % {$ip="99.206.102.$_";if ($ping.Send($ip).Status -ne "Success") {"Failed to ping $ip"} else {"Successfully pinged $ip"}}Anonymousnoreply@blogger.com