How to delete MoveCollection

Ashok Kumar Gupta 5 Reputation points
2023-04-19T06:53:06.29+00:00
I was trying to clean all resources inside the subscription via powershell commands

Get-AzResource | Remove-AzResource -Force

Get-AzResourceGroup | Remove-AzResourceGroup -Force 






Executed delete command on 'MoveCollection-eus-wus-eus2'
Error details
MoveCollection-eus-wus-eus2: Deletion of move collection is not allowed when there are move resources present in it.
      Possible Causes: The move collection has move resources present in it.
      Recommended Action: In Portal open 'Azure Resource Mover' > Across regions > Select SubscriptionId: da1a5f6a-d384-4710-986f-24c5acf88ef0, Source Region: eastus, Target Region: westus > delete all the resources, and then retry deleting the Resource group.
      For PowerShell please use remove resource cmdlet and delete all resources and then try deleting move collection or resource group. Please follow documentation  https://go.microsoft.com/fwlink/?linkid=2145903.
     (Code: DeleteCollectionFailedResourcesExists)
Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
236 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,771 Reputation points
    2023-04-19T08:18:25.6533333+00:00

    @Ashok Kumar Gupta Welcome to the Microsoft Q & A Community Forum. "MoveCollection-eus-wus-eus2: Deletion of move collection is not allowed when there are move resources present in it" is an error message that can occur when attempting to delete a move collection in Azure. This error message indicates that the move collection contains one or more move resources, and therefore the move collection cannot be deleted.

    When you create a move collection in Azure, you can use it to group together resources that you want to move from one region to another. These resources are referred to as move resources. If a move collection contains move resources, you cannot delete the move collection until all move resources have been moved or deleted.

    To resolve this issue, you will need to identify the move resources that are present in the move collection and either move them to a new region or delete them. Once all move resources have been moved or deleted, you can then delete the move collection.

    To identify the move resources in the move collection, you can navigate to the move collection in the Azure portal and view the list of resources. Any resources that are listed as move resources will need to be moved or deleted before the move collection can be deleted or you can use PowerShell commands to delete the move collection resource. For more information, refer this document.


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.