Created
June 20, 2019 01:27
-
-
Save ArtisanByteCrafter/2a23af46bf6396610db16ec03947be63 to your computer and use it in GitHub Desktop.
a Universal Dashboard implementation of IP Addresses from nmap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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