< Back

Set-AzureCustomRouteTable

Sat Jan 18, 2020 4:33 pm

NAME Set-AzureCustomRouteTable



SYNOPSIS

Set-AzureCustomRouteTable assists in creating and modifying Azure route tables.





SYNTAX

Set-AzureCustomRouteTable [[-RouteTableName] <String>] [[-Location] <String>] [[-RouteTableLabel] <String>]

[[-VirtualNetworkName] <String>] [[-SubnetName] <String>] [[-CustomRouteCsvPath] <String>] [<CommonParameters>]





DESCRIPTION

Set-AzureCustomRouteTable assists in creating and modifying Azure route tables.

The function will create a new route table if it doesn't exist, or modify a route

table if it does exist. Additionally the route table can be applied to an existing

subnet in an Azure virtual network.





PARAMETERS

-RouteTableName <String>

Enter a name for the route table to be created/modified.



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Location <String>

Enter an Azure data center location. Get-AzureLocation | Select-Object -Property Name



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RouteTableLabel <String>

Enter a description for your route table.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-VirtualNetworkName <String>

Enter a name of an existing virtual network if you wish to apply the route table.

This parameter also requires the SubnetName.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SubnetName <String>

Enter a name of an existing subnet in your Azure virtual network.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CustomRouteCsvPath <String>

Enter a path to a CSV formatted file with proper fields.



Format:

RouteTableName,Location,RouteTableLabel,RouteName,AddressPrefix,NextHopType,NextHopIpAddress,VirtualNetworkName

,SubnetName

BogusRouteTable2,East Us,Custom Route table,AzureUsEast-1,23.96.0.0/18,Internet,,,

BogusRouteTable2,East Us,Custom Route table,AzureUsEast-2,23.96.64.0/28,Internet,,,

BogusRouteTable2,East Us,Custom Route

table,AzureUsEast-3,8.8.8.8/32,VirtualAppliance,10.200.201.10,DefaultVirtualNetwork,Subnet-1



Required? false

Position? 6

Default value

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES





Created by: Jason Wasser @wasserja

Modified: 10/15/2016 10:33:23 AM

Version: 0.99



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-AzureCustomRouteTable -RouteTableName DMZRouteTable -Location 'East US' -RouteTableLable 'Custom Route

Table for DMZ'



Creates or modifies route table named DMZRouteTable. The script will ask you to

enter the routes to add to this subnet.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-AzureCustomRouteTable -RouteTableName DMZRouteTable -Location 'East US' -RouteTableLable 'Custom Route

Table for DMZ' -VirtualNetworkName DefaultVNet -SubnetName DMZSubnet



Creates or modifies route table named DMZRouteTable. The script will ask you to

enter the routes to add to this subnet. It will then apply the route table to the DMZSubnet

in the virtual network DefaultVNet.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Set-AzureCustomRouteTable -CustomRouteCsvPath C:\\Temp\\Set-AzureCustomRouteTable.csv



Creates or modifies route tables listed in the CSV file, including adding routes, and

applying route tables to subnets.











RELATED LINKS

https://azure.microsoft.com/en-us/docum ... -overview/

https://gallery.technet.microsoft.com/s ... e-e8488a43



Requires -Modules Azure,AzureRM