Skip to content

Instantly share code, notes, and snippets.

@gabrielrojasnyc
Last active December 11, 2015 03:38
Show Gist options
  • Save gabrielrojasnyc/fbad38ceb6f76969dc20 to your computer and use it in GitHub Desktop.
Save gabrielrojasnyc/fbad38ceb6f76969dc20 to your computer and use it in GitHub Desktop.
Find Available IP on the Vlan and display output on the screen
1..254 | ForEach-Object {
if(!(Test-Connection 10.0.100.$_ -count 1 -Quiet)) {
Write-Output "IP Address Available 10.0.100.$_"
}
else {
Write-Output "IP Address in use 10.0.100.$_"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment