Bewerken

Delen via


Remove-AzVirtualHubBgpConnection

The Remove-AzVirtualHubBgpConnection cmdlet removes a HubBgpConnection resource that peers the Azure Virtual WAN Hub Router with a BGP-enabled peer in a virtual network connected to the Virtual WAN Hub.

Syntax

Remove-AzVirtualHubBgpConnection
      -ResourceGroupName <String>
      -VirtualHubName <String>
      -Name <String>
      [-AsJob]
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzVirtualHubBgpConnection
      -Name <String>
      -VirtualHub <PSVirtualHub>
      [-AsJob]
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzVirtualHubBgpConnection
      -InputObject <PSBgpConnection>
      [-AsJob]
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzVirtualHubBgpConnection
      -ResourceId <String>
      [-AsJob]
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzVirtualHubBgpConnection cmdlet removes a HubBgpConnection resource that peers Azure Virtual WAN Hub Router with a BGP-enabled peer in virtual network connected to the Virtual WAN Hub.

Examples

Example 1

Remove-AzVirtualHubBgpConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -Name "testBgpConnection"

The above will remove a Virtual WAN Hub BGP Connection using its resource group name, the Virtual WAN Hub name and the Connection name.

Example 2

Get-AzVirtualHubBgpConnection -ResourceGroupName "testRG" -VirtualHubName "testHub" -Name "testBgpConnection" | Remove-AzVirtualHubBgpConnection

The above will remove a Virtual WAN Hub BGP Connection using powershell piping on the output from Get-AzVirtualHubBgpConnection.

Example 3

$bgpConnectionId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{bgpConnectionName}"
Remove-AzVirtualHubBgpConnection -ResourceId $bgpConnectionId

The above will remove a Virtual WAN Hub BGP Connection using the BGP Connection resource id.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The virtual hub bgp connection resource.

Type:PSBgpConnection
Aliases:VirtualHubBgpConnection
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The resource name.

Type:String
Aliases:ResourceName, BgpConnectionName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Returns an object representing the item on which this operation is being performed.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The resource id.

Type:String
Aliases:BgpConnectionId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VirtualHub

The virtual hub resource.

Type:PSVirtualHub
Aliases:ParentObject, ParentVirtualHub
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-VirtualHubName

The virtual hub name.

Type:String
Aliases:ParentResourceName, ParentVirtualHubName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSVirtualHub

PSBgpConnection

String

Outputs

Boolean