mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Add list-network-connections.ps1
This commit is contained in:
parent
d739604c79
commit
fae30d1d3f
20
Scripts/list-network-connections.ps1
Normal file
20
Scripts/list-network-connections.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists network connections
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists all active network connections on the local computer.
|
||||
.EXAMPLE
|
||||
PS> ./list-network-connections
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
& netstat -n
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user