< Back
New-AzureRmRouteConfig
Post
NAME New-AzureRmRouteConfig
SYNOPSIS
Creates a route for a route table.
SYNTAX
New-AzureRmRouteConfig [-AddressPrefix <String>] [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-NextHopIpAddress <String>]
[-NextHopType <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmRouteConfig cmdlet creates a route for an Azure route table.
PARAMETERS
-AddressPrefix <String>
Specifies the destination, in Classless Interdomain Routing (CIDR) format, to which the route applies.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a name for the route.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NextHopIpAddress <String>
Specifies the IP address of a virtual appliance that you add to your Azurevirtual network. This route forwards packets to that address.
Specify this parameter only if you specify a value of VirtualAppliance for the NextHopType parameter.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NextHopType <String>
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. - VirtualNetworkGateway. An Azure server-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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSRoute
NOTES
Example 1: Create a route
PS C:\\>$Route = New-AzureRmRouteConfig -Name "Route07" -AddressPrefix 10.1.0.0/16 -NextHopType "VnetLocal"
PS C:\\> $Route
Name : Route07
Id :
Etag :
ProvisioningState :
AddressPrefix : 10.1.0.0/16
NextHopType : VnetLocal
NextHopIpAddress :
The first command creates a route named Route07, and then stores it in the $Route variable. This route forwards packets to the local virtual
network.
The second command displays the properties of the route.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... outeconfig
Add-AzureRmRouteConfig
Get-AzureRmRouteConfig
Remove-AzureRmRouteConfig
Set-AzureRmRouteConfig
SYNOPSIS
Creates a route for a route table.
SYNTAX
New-AzureRmRouteConfig [-AddressPrefix <String>] [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-NextHopIpAddress <String>]
[-NextHopType <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmRouteConfig cmdlet creates a route for an Azure route table.
PARAMETERS
-AddressPrefix <String>
Specifies the destination, in Classless Interdomain Routing (CIDR) format, to which the route applies.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies a name for the route.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NextHopIpAddress <String>
Specifies the IP address of a virtual appliance that you add to your Azurevirtual network. This route forwards packets to that address.
Specify this parameter only if you specify a value of VirtualAppliance for the NextHopType parameter.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-NextHopType <String>
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. - VirtualNetworkGateway. An Azure server-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.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSRoute
NOTES
Example 1: Create a route
PS C:\\>$Route = New-AzureRmRouteConfig -Name "Route07" -AddressPrefix 10.1.0.0/16 -NextHopType "VnetLocal"
PS C:\\> $Route
Name : Route07
Id :
Etag :
ProvisioningState :
AddressPrefix : 10.1.0.0/16
NextHopType : VnetLocal
NextHopIpAddress :
The first command creates a route named Route07, and then stores it in the $Route variable. This route forwards packets to the local virtual
network.
The second command displays the properties of the route.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... outeconfig
Add-AzureRmRouteConfig
Get-AzureRmRouteConfig
Remove-AzureRmRouteConfig
Set-AzureRmRouteConfig