'Can not remove Azure MoveCollection

Cannot remove a MoveCollectin in Azure. Tried it in portal or PS

Remove-AzResourceMoverMoveCollection -MoveCollectionName MoveCollection-eus-eus2-eus2 -ResourceGroupName ResourceMoverRG-eastus-eastus2-eus2

Here is the error:

Remove-AzResourceMoverMoveCollection_Delete: 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: 14320207-c601-4e2c-99c4-57ffa57d4fef, Source Region: eastus, Target Region: eastus2 > 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.

Tried to go to 'Azure Resource Mover' > Across regions, there is nothing there.

Please help!

Thanks in advance!

Tao



Solution 1:[1]

Remove-AzResourceMoverMoveCollection_Delete: 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.

Run the below command and check the move resources listed in the output:

Get-AzResourceMoverMoveResource -MoveCollectionName <MoveCollectionName> -ResourceGroupName <ResourceGroupName>

Then you can remove the resource using Remove-AzResourceMoverMoveResource:

# Remove a resource using the resource ID
Remove-AzResourceMoverMoveResource -SubscriptionId <subscription-id> -ResourceGroupName <ResourceGroupName> -MoveCollectionName <MoveCollectionName> -Name <ResourceName>

Reference: Remove-AzResourceMoverMoveCollection_Delete: Deletion of move collection is not allowed when there are move resources present in it

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1