CmdID

CmdID / az / az network / az network local-gateway

az network local-gateway delete

Delete a local VPN gateway. Azure CLI reference

In order to delete a Local Network Gateway, you must first delete ALL Connection objects in Azure that are connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. For more information, follow the order of instructions on this page: https://learn.microsoft.com/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal

2 examples 1 option Its page in the Azure CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Delete a Local Network Gateway.

az network local-gateway delete -g MyResourceGroup -n MyLocalGatewayIdentify
-gName of resource group.
-nName of the local network gateway.

Delete a local VPN gateway. (autogenerated)

az network local-gateway delete --name MyLocalGateway --resource-group MyResourceGroup --subscription MySubscriptionIdentify
--nameName of the local network gateway.
--resource-groupName of resource group.
--subscriptionName or ID of subscription.

Options

1 in the Azure CLI reference
--name, -nName of the local network gateway.