Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-Netroute and 'route print' giving different route metric

$
0
0

I was reading Get-Netroute is the powershell equivalent of 'route print'.

However, the output of both the commands gives me different values for route metric. The below is from a test computer. Yes, I know it has two NIC , each with a default gateway set. (I know it is not a good idea. But that is a separate topic)

(1) Route print has (I have truncated the output)

Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       10.100.1.1     10.100.1.100    271
          0.0.0.0          0.0.0.0      10.150.17.1     10.150.17.64     16

(2) Get-netroute has (I have truncated the output as well)

PS C:\> get-netroute

ifIndex DestinationPrefix                              NextHop                                  RouteMetric PolicyStore
------- -----------------                              -------                                  ----------- -----------

7       0.0.0.0/0                                      10.150.17.1                                        1 ActiveStore
6       0.0.0.0/0                                      10.100.1.1                                       256 ActiveStore


--------------------------------------------

I trust the 'route print' only because I have been using it for 20 years :-). Anyhow what is the difference here? How do I get the real one?



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>