New-NetRoute cmdlet

Spread the words

The New-NetRoute cmdlet creates an IP route in the IP routing table. It specifies the destination prefix, and specifies an interface by using the interface alias or the interface index.


  • AddressFamily (IPv4, IPv6)

It specifies the IP address family.

  • CimSession

Run the cmdlet in a remote session or on a remote computer.

  • DestinationPrefix

It specifies a destination prefix of an IP route.

  • InterfaceAlias

It specifies the alias of a network interface.

  • InterfaceIndex

It specifies the index of a network interface.

  • NextHop

It specifies the next hop for the IP route.

  • PolicyStore (ActiveStore, PersistentStore)
  • PreferredLifetime
  • Protocol

It specifies the type of routing protocol.

  • Publish (No, Yes, Age)

It specifies the publish setting of an IP route.

  • RouteMetric

It specifies an integer route metric for an IP route.

  • ThrottleLimit
  • ValidLifetime
  • Confirm

It prompts for confirmation before running the cmdlet.

  • WhatIf

It shows what would happen if the cmdlet runs.



Examples :

New-NetRoute –Destinationprefix ‘’ –InterfaceAlias ‘Ethernet0’ –NextHop

Be the first to comment on "New-NetRoute cmdlet"

Leave a comment

Your email address will not be published.