mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 22:18:18 +02:00
Update list-network-neighbors.ps1
This commit is contained in:
parent
29bd848405
commit
54974f6660
@ -6,9 +6,9 @@
|
|||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-network-neighbors.ps1
|
PS> ./list-network-neighbors.ps1
|
||||||
|
|
||||||
Name InterfaceAlias IPAddress LinkLayerAddress State
|
Name InterfaceAlias IPAddress LinkLayerAddress State
|
||||||
---- -------------- --------- ---------------- -----
|
---- -------------- --------- ---------------- -----
|
||||||
<<>8:8:8<?;55;=55; Ethernet 224.0.0.251 01-00-5E-00-00-FB Permanent
|
<<>8:8:8<?;55;=55; Ethernet 224.0.0.251 01-00-5E-00-00-FB Permanent
|
||||||
...
|
...
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
@ -17,6 +17,8 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if ($IsLinux -or $IsMacOS) { throw "Sorry, currently available for Windows only" }
|
||||||
|
|
||||||
Get-NetNeighbor -includeAllCompartments | Format-Table -property Name,InterfaceAlias,IPAddress,LinkLayerAddress,State -autoSize
|
Get-NetNeighbor -includeAllCompartments | Format-Table -property Name,InterfaceAlias,IPAddress,LinkLayerAddress,State -autoSize
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user