PowerShell/scripts/list-network-routes.ps1

21 lines
397 B
PowerShell
Raw Normal View History

2023-10-31 12:33:36 +01:00
<#
2022-10-25 16:21:16 +02:00
.SYNOPSIS
Lists network routes
.DESCRIPTION
This PowerShell script lists the network routes on the local computer.
.EXAMPLE
2023-08-06 21:35:36 +02:00
PS> ./list-network-routes.ps1
2022-10-25 16:21:16 +02:00
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
& route print
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
2023-08-06 21:35:36 +02:00
}