Get-Network Controller Virtual Gateway Bgp Peer

Gets a BGP peer.

Syntax

Get-NetworkControllerVirtualGatewayBgpPeer
   [-VirtualGatewayId] <String[]>
   [-BgpRouterName] <String[]>
   [[-ResourceId] <String[]>]
   -ConnectionUri <Uri>
   [-CertificateThumbprint <String>]
   [-Credential <PSCredential>]
   [-PassInnerException]
   [<CommonParameters>]

Description

The Get-NetworkControllerVirtualGatewayBgpPeer cmdlet gets the configuration of the Border Gateway Protocol (BGP) peer configuration for the peer(s) specified by the ResourceId parameter. If you do not specify the ResourceId , this cmdlet gets the configuration for all BGP peers of the tenant.

Examples

Example 1: Display all BGP peer configurations for the tenant virtual gateway

PS C:\> Get-NetworkControllerVirtualGatewayBgpPeer -ConnectionUri https://networkcontroller -VirtualGatewayId "Contoso" -BgpRouterName "Contoso_Vnet_Router1"
ResourceMetadata : 
ResourceRef      : /VirtualGateways/Contoso/BgpRouters/Contoso_Vnet_Router1/BgpPeers/Contoso_SiteB_Gre
InstanceId       : 75320697-f1f9-486a-867c-cdc89ca3d958
Etag             : W/"b2e94f9d-c589-4c11-84dc-fc2241135352"
ResourceId       : Contoso_SiteB_Gre
Properties       : Microsoft.Windows.NetworkController.VGwBgpPeerProperties
ResourceMetadata : 
ResourceRef      : /VirtualGateways/Contoso/BgpRouters/Contoso_Vnet_Router1/BgpPeers/Contoso_SiteC_L3
InstanceId       : 0e36be61-11b5-4764-b64e-5e5181689c69
Etag             : W/"b2e94f9d-c589-4c11-84dc-fc2241135352"
ResourceId       : Contoso_SiteC_L3
Properties       : Microsoft.Windows.NetworkController.VGwBgpPeerProperties

This command retrieves all the BGP peers for virtual gateway Contoso configured with the Network Controller where the BGP router is Contoso_Vnet_Router1.

Example 2: Display a specified BGP peer configuration for the tenant virtual gateway

PS C:\> Get-NetworkControllerVirtualGatewayBgpPeer -ConnectionUri "https://networkcontroller" -VirtualGatewayId "Contoso" -BgpRouterName "Contoso_Vnet_Router1" -ResourceId "Contoso_SiteB_Gre"
ResourceMetadata : 
ResourceRef      : /VirtualGateways/Contoso/BgpRouters/Contoso_Vnet_Router1/BgpPeers/Contoso_SiteB_Gre
InstanceId       : 75320697-f1f9-486a-867c-cdc89ca3d958
Etag             : W/"b2e94f9d-c589-4c11-84dc-fc2241135352"
ResourceId       : Contoso_SiteB_Gre
Properties       : Microsoft.Windows.NetworkController.VGwBgpPeerProperties

This command retrieves the BGP peer configuration for tenant Contoso where the router is Contoso_Vnet_Router1 and the peer name is Contoso_SiteB_Gre.

Required Parameters

-BgpRouterName

Specifies an array of names of BGP routers.

Type: String[]
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ConnectionUri

Specifies the Uniform Resource Identifier (URI) of the Network Controller, used by all Representational State Transfer (REST) clients to connect to Network Controller.

Type: Uri
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-VirtualGatewayId

Specifies an array of virtual gateway IDs.

Type: String[]
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

Optional Parameters

-CertificateThumbprint

Specifies the digital public key X.509 certificate of a user account that has permission to perform this action. This is the certificate thumbprint of the certificate. This thumbprint must also be provided in the ClientCertificateThumbprint parameter in the Install-NetworkController or Set-NetworkController cmdlet so that Network Controller can authorize this user.

Type: String
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Credential

Specifies a user credential that has permission to perform this action. The default value is the current user. This user must be present in the security group provided in the ClientSecurityGroup parameter in the Install-NetworkController cmdlet.

Type: PSCredential
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PassInnerException
Type: SwitchParameter
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResourceId

Specifies an array of resource IDs of BGP peers.

Type: String[]
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Outputs

This cmdlet returns object(s) that contain the following fields:

  • Resource reference URI.
  • Created time of the resource.
  • Instance ID of the resource.
  • Resource metadata.
  • Resource ID.
  • Properties of the resource (a virtual/tenant gateway's BGP peer):
    • Provisioning state.
    • Peer BGP router IP address.
    • Peer BGP router autonomous system (AS) number.
    • Peer BGP router extended AS number.
    • Peer connection state.
    • Connectivity statistics.
    • Whether the BGP peer is automatically generated.
    • Array of BGP routing policy maps applied to the peers in ingress/egress direction.