Redigera

Dela via


Remove-AzP2sVpnGateway

Removes an existing P2SVpnGateway.

Syntax

Remove-AzP2sVpnGateway
      -ResourceGroupName <String>
      -Name <String>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzP2sVpnGateway
      -InputObject <PSP2SVpnGateway>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzP2sVpnGateway
      -ResourceId <String>
      [-PassThru]
      [-Force]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-AzP2sVpnGateway cmdlet enables you to remove an existing P2SVpnGateway under VirtualHub. All the point to site clients connectivity will fail after P2SVpnGateway is removed.

Examples

Example 1

Remove-AzP2sVpnGateway -Name 683482ade8564515aed4b8448c9757ea-westus-gw -ResourceGroupName P2SCortexGATesting -Force -PassThru

The Remove-AzP2sVpnGateway cmdlet enables you to remove an existing P2SVpnGateway under VirtualHub.

Parameters

-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.

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

-InputObject

The p2sVpnGateway object to be deleted.

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

-Name

The P2SVpnGateway name.

Type:String
Aliases:ResourceName, P2SVpnGatewayName
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 Azure resource ID for the p2sVpnGateway to be deleted.

Type:String
Aliases:p2sVpnGatewayId
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

PSP2SVpnGateway

System.String

Outputs

Boolean