Skip to content

Instantly share code, notes, and snippets.

@xandout
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xandout/07bc99d2b41b2a19051c to your computer and use it in GitHub Desktop.
Save xandout/07bc99d2b41b2a19051c to your computer and use it in GitHub Desktop.
PowerShell Find Live Hosts
$ping = New-Object System.Net.Networkinformation.Ping
1..254 | % {
$test = $ping.Send("192.168.1.$_", 50);
If($test.status -eq "Success"){
Write-output $test.address.IPAddressToString
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment