Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

Move your Azure resources in CLI instead of using the portal

  • April 21, 2022
  • 3 min read
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.


A great feature in Azure is the possibility to move resources to:

– Another resource group

– Another subscription

– Another region

The list of resources that you can move is available here: Move operation support by resource type – Azure Resource Manager | Microsoft Docs

In this example, I will move a MySQL Database Server from a subscription A to a subscription B. By the portal, it is easy, but it can take a long time to do the validation and the move:

Move resources

After waiting each time the long validation period, I find another way to do not wait so many time: with CLI.

The first command to execute to validate that we can do the move is az resource invoke-action. Let’s do this for our resource:

If the answer is empty, you are good to go to move the resource. Otherwise, you will have the error, for example, if you use Private Endpoint, you will not be able to move your resource:Private Endpoint

Private Endpoint 2

In my case I can move the resource. I will use the az resource move command to do the job:

After few minutes, we can see that the resource moved to the other subscription:The resource moved to the other subscription

The resource moved to the other subscription 2

Resource group

Like this it is very simple to automate the move of resources to another resource group/subscription/region. The only limitation is that not all resources can move at this time.

Hey! Found Florent’s insights useful? Looking for a cost-effective, high-performance, and easy-to-use hyperconverged platform?
Taras Shved
Taras Shved StarWind HCI Appliance Product Manager
Look no further! StarWind HCI Appliance (HCA) is a plug-and-play solution that combines compute, storage, networking, and virtualization software into a single easy-to-use hyperconverged platform. It's designed to significantly trim your IT costs and save valuable time. Interested in learning more? Book your StarWind HCA demo now to see it in action!