Renaming Virtual Network

Mrskos, Radek 21 Reputation points
2022-12-08T14:32:57.833+00:00

Hi

Is there a way to rename the Virtual Network?

Thanks for help in advance.
Radek

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.
2,505 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 57,431 Reputation points
    2022-12-08T15:29:11.743+00:00

    Hi @Mrskos, Radek

    You cannot rename a Virtual Network after creation. You must create a new Virtual Network and reassign the resources to it.

    -------------------------

    If this is helpful please accept answer.

    1 person found this answer helpful.

5 additional answers

Sort by: Most helpful
  1. Nico Marino 31 Reputation points
    2022-12-09T06:26:23.65+00:00

    @Mrskos, Radek out of my curiosity... why are you performing this action via a script?
    Did you try selecting all the Azure resources –> Click on the More option –> Select Move option –> Then choose Move to another resource group option.
    ?

    0 comments No comments

  2. Mrskos, Radek 21 Reputation points
    2022-12-09T09:59:34.61+00:00

    Hello Nico

    I did not know, now I know thanks. But at least I know how to do it now with powershell.
    I could move almost everything, except the Virtual Network, is there a reason why it can not be moved?

    0 comments No comments

  3. Nico Marino 31 Reputation points
    2022-12-09T11:20:31.233+00:00

    @Mrskos, Radek
    is there any resource still attached to the VNET (if you take a look at the source RG)?
    can you please try moving the VNET (from the source RG to the destination one) using the way I showed in my previous comment?

    0 comments No comments

  4. Mrskos, Radek 21 Reputation points
    2022-12-09T12:40:39.88+00:00

    Yes, the Peering. Because the checks are done per VNET, Azure can not move VNET after VNET, so I have deleted the Peering between the two VNETs. Now I could move it to the new RG.

    0 comments No comments

Your answer

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