< Back
Set-AzureRmRouteTable
Post
NAME Set-AzureRmRouteTable
SYNOPSIS
Sets the goal state for a route table.
SYNTAX
Set-AzureRmRouteTable [-AsJob] [-DefaultProfile <IAzureContextContainer>] -RouteTable <PSRouteTable> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmRouteTable cmdlet sets the goal state for 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
-RouteTable <PSRouteTable>
Specifies a route table object that represents the goal state to which this cmdlet sets the route table.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
PSRouteTable
Parameter 'RouteTable' accepts value of type 'PSRouteTable' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSRouteTable
NOTES
Example 1: Add a route and then set the goal state of the route table
PS C:\\>Get-AzureRmRouteTable -ResourceGroupName "ResourceGroup11" -Name "RouteTable01" | Add-AzureRmRouteConfig -Name "Route07" -AddressPrefix
10.2.0.0/16 -NextHopType "VnetLocal" | Set-AzureRmRouteTable
Name : RouteTable01
ResourceGroupName : ResourceGroup11
Location : eastus
Id : /subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Microsoft.Networ
k/routeTables/RouteTable01
Etag : W/"f13e1bc8-d41f-44d0-882d-b8b5a1134f59"
ProvisioningState : Succeeded
Tags :
Routes : [
{
"Name": "Route07",
"Etag": "W/\\"f13e1bc8-d41f-44d0-882d-b8b5a1134f59\\"",
"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"
},
{
"Name": "Route07",
"Etag": "W/\\"f13e1bc8-d41f-44d0-882d-b8b5a1134f59\\"",
"Id": "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Micro
soft.Network/RouteTables/RouteTable01/routes/Route07",
"AddressPrefix": "10.2.0.0/16",
"NextHopType": "VnetLocal",
"NextHopIpAddress": null,
"ProvisioningState": "Succeeded"
},
{
"Name": "Route13",
"Etag": null,
"Id": null,
"AddressPrefix": "10.3.0.0/16",
"NextHopType": "VnetLocal",
"NextHopIpAddress": null,
"ProvisioningState": null
}
]
Subnets : []
This command gets the route table named RouteTable01 by using Get-AzureRmRouteTable cmdlet. The command passes that table to the
Add-AzureRmRouteConfig cmdlet by using the pipeline operator. Add-AzureRmRouteConfig adds the route named Route07, and then passes the result to
the current cmdlet, which updates the table to reflect your changes.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... routetable
Add-AzureRmRouteConfig
Get-AzureRmRouteTable
New-AzureRmRouteTable
Remove-AzureRmRouteTable
SYNOPSIS
Sets the goal state for a route table.
SYNTAX
Set-AzureRmRouteTable [-AsJob] [-DefaultProfile <IAzureContextContainer>] -RouteTable <PSRouteTable> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmRouteTable cmdlet sets the goal state for 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
-RouteTable <PSRouteTable>
Specifies a route table object that represents the goal state to which this cmdlet sets the route table.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
PSRouteTable
Parameter 'RouteTable' accepts value of type 'PSRouteTable' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSRouteTable
NOTES
Example 1: Add a route and then set the goal state of the route table
PS C:\\>Get-AzureRmRouteTable -ResourceGroupName "ResourceGroup11" -Name "RouteTable01" | Add-AzureRmRouteConfig -Name "Route07" -AddressPrefix
10.2.0.0/16 -NextHopType "VnetLocal" | Set-AzureRmRouteTable
Name : RouteTable01
ResourceGroupName : ResourceGroup11
Location : eastus
Id : /subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Microsoft.Networ
k/routeTables/RouteTable01
Etag : W/"f13e1bc8-d41f-44d0-882d-b8b5a1134f59"
ProvisioningState : Succeeded
Tags :
Routes : [
{
"Name": "Route07",
"Etag": "W/\\"f13e1bc8-d41f-44d0-882d-b8b5a1134f59\\"",
"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"
},
{
"Name": "Route07",
"Etag": "W/\\"f13e1bc8-d41f-44d0-882d-b8b5a1134f59\\"",
"Id": "/subscriptions/xxxx-xxxx-xxxx-xxxx/resourceGroups/ResourceGroup11/providers/Micro
soft.Network/RouteTables/RouteTable01/routes/Route07",
"AddressPrefix": "10.2.0.0/16",
"NextHopType": "VnetLocal",
"NextHopIpAddress": null,
"ProvisioningState": "Succeeded"
},
{
"Name": "Route13",
"Etag": null,
"Id": null,
"AddressPrefix": "10.3.0.0/16",
"NextHopType": "VnetLocal",
"NextHopIpAddress": null,
"ProvisioningState": null
}
]
Subnets : []
This command gets the route table named RouteTable01 by using Get-AzureRmRouteTable cmdlet. The command passes that table to the
Add-AzureRmRouteConfig cmdlet by using the pipeline operator. Add-AzureRmRouteConfig adds the route named Route07, and then passes the result to
the current cmdlet, which updates the table to reflect your changes.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... routetable
Add-AzureRmRouteConfig
Get-AzureRmRouteTable
New-AzureRmRouteTable
Remove-AzureRmRouteTable