Example 1: Less Detail
0..255|%{$a="192.168.0.$_";$b=Test-Connection -count 1 -ComputerName $a -quiet;If($b){Write-Host $a}}
Example 2: More Detail
0..255|%{$a="192.168.0.$_";$b=Test-Connection -count 1 -ComputerName $a -quiet;If($b){Test-NetConnection -ComputerName $a}}
No comments:
Post a Comment