Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Created May 5, 2022 16:10
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 cmatskas/ef08fe2c222e2cfe7fa5806fd5f730e4 to your computer and use it in GitHub Desktop.
Save cmatskas/ef08fe2c222e2cfe7fa5806fd5f730e4 to your computer and use it in GitHub Desktop.
Scan All IP Addresses on Internal Network
1..254 | ForEach-Object {
if(!(Test-Connection 192.168.153.$_ -count 1 -Quiet)) {
Write-Output "IP Address Available 192.168.153.$_"
}
else {
Write-Output "IP Address in use 192.168.153.$_"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment