Skip to content

Instantly share code, notes, and snippets.

@ArtisanByteCrafter
Created June 20, 2019 01:27
Show Gist options
  • Save ArtisanByteCrafter/2a23af46bf6396610db16ec03947be63 to your computer and use it in GitHub Desktop.
Save ArtisanByteCrafter/2a23af46bf6396610db16ec03947be63 to your computer and use it in GitHub Desktop.
a Universal Dashboard implementation of IP Addresses from nmap
New-UDPage -Name "Home" -Icon home -Content {
New-UDRow -Columns {
New-UDColumn -Size 6 {
New-UDGrid -Title 'IP Addresses' -AutoRefresh -RefreshInterval 3600 -Endpoint {
$IPs = nmap -sn 192.168.202.0/24 | grep scan
$Results = Foreach ($IP in $IPs) {
[PSCustomObject]@{
Hostname = ($IP -split ' ')[4]
IP = ($IP -split ' ')[5]
}
}
$Results | Out-UDGridData
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment