Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Get "up" network interfaces so can cross reference to network routes
- $upInterfaces = @( Get-NetAdapter -IncludeHidden | Where Status -ieq 'Up' )
- Get-NetRoute -InterfaceIndex $upInterfaces.ifIndex -ErrorAction SilentlyContinue|select @{n='Interface';e={$script:if = ($upInterfaces|Where-Object ifIndex -eq $_.ifIndex);$script:if.Name}},@{n='Description';e={$script:if.InterfaceDescription}},DestinationPrefix,NextHop,InterfaceMetric,RouteMetric,State|sort-object -property interface,DestinationPrefix|format-table -auto
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement