This command gets the route table named RouteTable01 by using the Get-AzRouteTable cmdlet.
The command passes that table to the current cmdlet by using the pipeline operator.
The current cmdlet modifies the route named Route02, and then passes the result to the Set-AzRouteTable cmdlet, which updates the table to reflect your changes.
Example 2: Modify a route using a Service Tag (Public Preview)
Specifies the destination, in Classless Interdomain Routing (CIDR) format, to which the route applies. You can also specify a Service Tag here (this feature is in Public Preview).
Specifies the next hop IP address(es) that this route forwards packets to.
For a NextHopType of VirtualAppliance, supply a single IP address of a virtual appliance that you add to your Azure virtual network.
For a NextHopType of VirtualApplianceEcmp, supply between 2 and 64 IP addresses to load-balance traffic across using equal-cost multi-path (ECMP) routing.
Specifies how this route forwards packets.
The acceptable values for this parameter are:
Internet.
The default Internet gateway provided by Azure.
None.
If you specify this value, the route does not forward packets.
VirtualAppliance.
A virtual appliance that you add to your Azure virtual network.
VirtualApplianceEcmp.
Multiple virtual appliances that traffic is load-balanced across using equal-cost multi-path (ECMP) routing. Provide the appliance IP addresses through the NextHopIpAddress parameter.
VirtualNetworkGateway.
An Azureserver-to-server virtual private network gateway.
VnetLocal.
The local virtual network.
If you have two subnets, 10.1.0.0/16 and 10.2.0.0/16 in the same virtual network, select a value of VnetLocal for each subnet to forward to the other subnet.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.