< Back

New-AzureRmRouteTable

Tue Jan 29, 2019 9:56 pm

NAME New-AzureRmRouteTable



SYNOPSIS

Creates a route table.





SYNTAX

New-AzureRmRouteTable [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DisableBgpRoutePropagation] [-Force] -Location <String> -Name <String>

-ResourceGroupName <String> [-Route <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSRoute]>] [-Tag <Hashtable>]

[-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The New-AzureRmRouteTable cmdlet creates an Azure route table.





PARAMETERS

-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

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



-DisableBgpRoutePropagation [<SwitchParameter>]

Disable BGP Route auto propagation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that this cmdlet creates a route table even if a route table that has the same name already exists.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Location <String>

Specifies the Azure region in which this cmdlet creates a route table. For more information, see Azure Regions

(http://azure.microsoft.com/en-us/regions/).



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

Specifies a name for the route table.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group in which this cmdlet creates a route table.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Route <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSRoute]>

Specifies an array of Route objects to associate with the route table.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <Hashtable>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



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.PSRouteTable







NOTES









Example 1: Create a route table that contains a route



PS C:\\>$Route = New-AzureRmRouteConfig -Name "Route07" -AddressPrefix 10.1.0.0/16 -NextHopType "VnetLocal"

PS C:\\> New-AzureRmRouteTable -Name "RouteTable01" -ResourceGroupName "ResourceGroup11" -Location "EASTUS" -Route $Route

Name : routetable01

ResourceGroupName : ResourceGroup11

Location : eastus

Id : /subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Microsoft.Networ

k/routeTables/myroutetable

Etag : W/"db5f4e12-3f34-465b-92dd-0ab3bf6fc274"

ProvisioningState : Succeeded

Tags :

Routes : [

{

"Name": "route07",

"Etag": "W/\\"db5f4e12-3f34-465b-92dd-0ab3bf6fc274\\"",

"Id": "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Micro

soft.Network/routeTables/routetable01/routes/route07",

"AddressPrefix": "10.1.0.0/16",

"NextHopType": "VnetLocal",

"NextHopIpAddress": null,

"ProvisioningState": "Succeeded"

}

]

Subnets : []



The first command creates a route named Route07 by using the New-AzureRmRouteConfig cmdlet, and then stores it in the $Route variable. This route

forwards packets to the local virtual network.



The second command creates a route table named RouteTable01, and adds the route stored in $Route to the new table. The command specifies the

resource group to which the table belongs and the location for the table.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... routetable

Get-AzureRmRouteTable

New-AzureRmRouteConfig

Remove-AzureRmRouteTable

Set-AzureRmRouteTable