We were trying to move a database from one resource group to another resource group. Unfortunately, we got the below error message while tried to move the database :
Move-AzureRmResource : ResourceNotTopLevel : Identifier '' is not a top level resource. At line:1 char:1 + Move-AzureRmResource -DestinationResourceGroupName -ResourceId /subscrip ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Move-AzureRmResource], ErrorResponseMessageException + FullyQualifiedErrorId : ResourceNotTopLevel,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.Move AzureResourceCommand
Please see the below command which we used to move the database,
$resource = Get-AzureRmResource -ResourceName Name -ResourceGroupName oldRG
Move-AzureRmResource -DestinationResourceGroupName NewRG -ResourceId $resource.ResourceId
Could you please tell us how can move the database to another resource group?