How to scan an IP network with Windows

Argomenti vari di carattere sistemistico
Post Reply
daniele
Posts: 341
Joined: 04 Mar 2009, 13:59

How to scan an IP network with Windows

Post by daniele »

1 - With command prompt

Code: Select all

FOR /L %i IN (1,1,254) DO ping -n 1 -w 100 192.168.1.%i | find "Risposta da" >> risultati.txt

2 - With Powershell

Code: Select all

1..254 | ForEach-Object {Test-Connection -ComputerName "192.168.1.$_" -Count 1 -Quiet} | Where-Object {$_ -eq $true} | ForEach-Object {"Host attivo: 192.168.1.$_"}
Post Reply