Q. How can I move resources between Azure Resource Groups?

Move resources between resource groups using PowerShell

John Savill

July 27, 2015

1 Min Read
Q. How can I move resources between Azure Resource Groups?

Q. How can I move resources between Azure Resource Groups?

A. To move resources between Azure Resource Groups use the various AzureResource PowerShell cmdlets. After loading the Azure PowerShell module and authenticating using an Azure AD account (Add-AzureAccount) switch the mode to Azure Service Manager.

Switch-AzureMode -Name AzureResourceManager

Firstly to view all Resource Groups use:

Get-AzureResourceGroup

To view all resources in a specific Resource Group use:

Get-AzureResource -ResourceGroupName

To move all resources in a Resource Group use (I use Force to avoid prompt to confirm the move)

Get-AzureResource -ResourceGroupName | Move-AzureResource -DestinationResourceGroupName -Force

To move an individual resource use:

Get-AzureResource -ResourceName -ResourceGroupName | Move-AzureResource -DestinationResourceGroupName -Force

Easy!

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like