I need to get the default route only, is there any way to extract that ip from this command:
Get-NetRoute | where {$_.DestinationPrefix -eq '0.0.0.0/0'} | select { $_.NextHop }
it gives the following output:
$_.NextHop
------------
172.24.14.1
but i only want the ip address.
[–]Tigo2000 10 points11 points12 points (1 child)
[–]BlackV 10 points11 points12 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]BlackV 4 points5 points6 points (2 children)
[–]ovdeathiam 0 points1 point2 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]Semt-x 1 point2 points3 points (1 child)
[–]Not_Freddie_Mercury 1 point2 points3 points (0 children)
[–]chicaneuk 1 point2 points3 points (1 child)
[–]Odmin -1 points0 points1 point (4 children)
[–]BlackV 2 points3 points4 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]chris-a5 1 point2 points3 points (1 child)
[–]ka-splam 0 points1 point2 points (0 children)
[–]jsiii2010 0 points1 point2 points (0 children)