Page 1 of 1

How to scan an IP network with Windows

Posted: 06 Nov 2024, 11:00
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.$_"}