< Back

Remove-AzureRmRouteConfig

Tue Jan 29, 2019 9:57 pm

NAME Remove-AzureRmRouteConfig



SYNOPSIS

Removes a route from a route table.





SYNTAX

Remove-AzureRmRouteConfig [-DefaultProfile <IAzureContextContainer>] [-Name <String>] -RouteTable <PSRouteTable> [-Confirm] [-WhatIf]

[<CommonParameters>]





DESCRIPTION

The Remove-AzureRmRouteConfig cmdlet removes a route from an Azure route table.





PARAMETERS

-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 the name of the route that this cmdlet removes.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RouteTable <PSRouteTable>

Specifies the route table that contains the route that this cmdlet deletes.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, 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: Remove a route



PS C:\\>Get-AzureRmRouteTable -ResourceGroupName "ResourceGroup11" -Name "RouteTable01" | Remove-AzureRmRouteConfig -Name "Route02" |

Set-AzureRmRouteTable

Name : RouteTable01

ResourceGroupName : ResourceGroup11

Location : eastus

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

k/routeTables/RouteTable01

Etag : W/"47099b62-60ec-4bc1-b87b-fad56cb8bed1"

ProvisioningState : Succeeded

Tags :

Routes : [

{

"Name": "Route07",

"Etag": "W/\\"47099b62-60ec-4bc1-b87b-fad56cb8bed1\\"",

"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 : []



This command gets the route table named RouteTable01 by using the Get-AzureRmRouteTable cmdlet. The command passes that table to the current

cmdlet by using the pipeline operator. The current cmdlet remove the route named Route02, and the passes the result to the Set-AzureRmRouteTable

cmdlet, which updates the table to reflect your changes. The table no longer contains the route named Route02.







RELATED LINKS

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

Add-AzureRmRouteConfig

Get-AzureRmRouteConfig

New-AzureRmRouteConfig

Set-AzureRmRouteConfig