Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Host de départ
- $host_n = 1
- #Test de la plage 1 à 254
- while($host_n -le 254)
- {
- # 1 ping sur l'ip et conversion du resultat en true/false
- $ping = Test-Connection 192.168.1.$host_n -count 1 -quiet
- #Si ping = true, afficher l'IP
- if($ping -match "True")
- {
- Write-Host "192.168.1.$host_n"
- }
- $host_n++
- }
Advertisement
Add Comment
Please, Sign In to add comment