Get-​Azure​Rm​Virtual​Network​Gateway​Advertised​Route

Lists routes being advertised by an Azure virtual network gateway

Syntax

Get-AzureRmVirtualNetworkGatewayAdvertisedRoute
   -Peer <String>
   -ResourceGroupName <String>
   -VirtualNetworkGatewayName <String>
   [<CommonParameters>]

Description

Given the IP of a BGP peer, enumerates routes being advertised to that peer by the specified Azure virtual network gateway.

Examples

Example 1

PS C:\> Get-AzureRmVirtualNetworkGatewayAdvertisedRoute -VirtualNetworkGatewayName gatewayName -ResourceGroupName resourceGroupName -Peer 10.0.0.254

For the Azure gateway named gatewayName in resource group resourceGroupName, retrives a list of routes being advertised to the BGP peer with IP 10.0.0.254

Example 2

PS C:\> $bgpPeerStatus = Get-AzureRmVirtualNetworkGatewayBGPPeerStatus -VirtualNetworkGatewayName gatewayName -ResourceGroupName resourceGroupName
PS C:\> Get-AzureRmVirtualNetworkGatewayAdvertisedRoute -VirtualNetworkGatewayName gatewayName -ResourceGroupName resourceGroupName -Peer $bgpPeerStatus[0].Neighbor

For the Azure gateway named gatewayName in resource group resourceGroupName, retrieves routes being advertised to the first BGP peer on the gateway's list of BGP peers.

Required Parameters

-Peer

BGP peer's IP address. This should be an IP within the address space accessible from within the Azure virtual network the gateway is deployed in.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Virtual network gateway resource group's name

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VirtualNetworkGatewayName

Virtual network gateway name

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.Azure.Commands.Network.Models.PSGatewayRoute[]

Notes

This command is only applicable to Azure virtual network gateways with BGP enabled connections.