I have created a Powershell script that allows me to move resources in a DEV subscription to a resource group in a PROD subscription.
When I run the script: it runs and runs but does not stop so I stop the execution however when I look in Azure my resources have been moved.
Do you know how I can fix the problem ?
Here is the script
$resources = Get-AzResource -Name * -ResourceGroupName "Name"
Move-AzResource -DestinationResourceGroupName "Test" -DestinationSubscriptionId "ID" -ResourceId $resources.Id -Force
I looked in the Azure documentation but couldn't find anything : Link : https://learn.microsoft.com/en-us/powershell/module/az.resources/move-azresource?view=azps-9.4.0