Azure Quick Tip: Cloning an Azure virtual network the easy way

There are many reasons why you may need to duplicate an existing virtual network, and, of course, the reasons will vary. In my case, my customer asked to create a “bubble” network where they want to replicate the same layout and IP ranges associated. I went ahead and created a script to do exactly that, making sure that all IP ranges for the virtual network and subnets are replicated to a second virtual network. The script for cloning an Azure virtual network is simple, and you can get access to the source here. We need to provide the virtual network that we want to clone, the destination resource group and a name for the clone. (This name will be added as a suffix of the cloned virtual network.)

cloning an Azure virtual network

The result will be a brand new virtual network with the configuration at the IP level of the original virtual network.

cloning an Azure virtual network

So, as you can see, cloning an Azure virtual network is a snap.

About The Author

2 thoughts on “Azure Quick Tip: Cloning an Azure virtual network the easy way”

  1. hi, do you have any idea why I would get the following output?

    VNETClone.ps1: Cannot validate argument on parameter ‘SourceVirtualNetworkName’. The “Get-AzVirtualNetwork -Name ($_)” validation script for the argument with value “prod-vnet” did not return a result of True. Determine why the validation script failed, and then try the command again.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top