Virtual Network vnet-test can not be updated when deletion was attempted earlier.

Snorre Arstad 0 Reputation points
2026-10-07T06:37:50.0766667+00:00

I have a vnet that is stuck in a failed state so i can't change it or delete it:

Set-AzVirtualNetwork: Virtual Network vnet-test-lab can not be updated when deletion was attempted earlier.
StatusCode: 400
ReasonPhrase:
ErrorCode: VnetCannotGetUpdatedWhenDeletionWasAttemptedEarlier
ErrorMessage: Virtual Network vnet-test can not be updated when deletion was attempted earlier.

And

¨Remove-AzVirtualNetwork: Long running operation failed with status 'Failed'. Additional Info:'An error occurred.'
StatusCode: 200
ReasonPhrase:
Status: Failed
ErrorCode: InternalServerError
ErrorMessage: An error occurred.

Azure Virtual Network
Azure Virtual Network

An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Salamat Shah 830 Reputation points MVP
    2026-10-07T08:56:37.1133333+00:00

    The error VnetCannotGetUpdatedWhenDeletionWasAttemptedEarlier indicates the VNet is stuck in an incomplete or failed deletion state.

    1. Check Activity Log for failed delete/update operations on the VNet.
    2. Verify whether dependent resources still exist (peering, gateways, private endpoints, delegated subnets, NICs, etc.).
    3. Retry the delete operation via Portal, Azure CLI, or PowerShell after confirming dependencies are removed.
    4. If the VNet remains stuck and both update and delete operations fail with internal server errors, this is typically a backend resource state issue.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.