Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Azure resources doesn't do anything #379

tomasherceg opened this issue May 12, 2015 · 14 comments

Moving Azure resources doesn't do anything #379

tomasherceg opened this issue May 12, 2015 · 14 comments


Copy link

@tomasherceg tomasherceg commented May 12, 2015

I tried to used the Move-AzureResource commandlet and it doesn't do anything.
It returns me immediately to the Powershell prompt.


get-azureresource -resourcegroupname MyGroup | move-azureresource -destinationresourcegroupname MyNewGroup


move-azureresource -destinationresourcegroupname MyNewGroup -ResourceId MyResourceId -Force

works for me.

The behavior is exactly the same as here:

Copy link

@ghost ghost commented May 26, 2015

I have got the exact same problem
Nothing happens when you run the commands.
Debug shows nothing interesting or errors

Copy link

@ilkayilknur ilkayilknur commented May 29, 2015

@eriksonjonas I used March release instead of the latest release and it worked. I've moved a storage account to other resource group. This may help you.

Copy link

@steevegilbert steevegilbert commented May 29, 2015

Same here, I'll go and try the March release as suggested

Copy link

@ghost ghost commented May 29, 2015

@ilkayilknur thx, ill try that release

Copy link

@petrsvihlik petrsvihlik commented Jun 1, 2015

I tried 0.8.16 but moving web apps doesn't work in that version either...

Copy link

@ghost ghost commented Jun 1, 2015

Interesting, i could move a storage acc, but no cloud service and vm.

Copy link

@sagoo33 sagoo33 commented Jun 2, 2015

Same for me, I'm trying to move a web app from a resource group in the Australian data centre to another resource group in the same data centre, and I receive a number of error messages (from the portal audit log)

"...statusMessage:{"Code":"Conflict","Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first.","Target":null,"Details":[{"Message":"ResourceGroup contains resources and cannot be deleted without deleting the resource first."}..."

statusMessage:{"Code":"BadRequest","Message":"Exception of type 'Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException' was thrown."}"

Could this be something to do with the application insights and event rules (belonging to the web app/app service plan/resourcegroup) being housed in the Central US data centre?

I am trying this in version 0.9.2.

This is the result from the powershell window:

Move-AzureResource : {
"Error": {
"Code": "99",
"Message": "Resources '/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microso
ft.insights/alertrules/CPUHigh adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/a
dam-RG/providers/microsoft.insights/alertrules/LongHttpQueue adam-webserver-test,/subscriptions/{subscriptionid}/resourceGroups/adam-RG/providers/microsoft.insights/autoscalesettings/adam-webserver-test-adam-RG,/subscr
456' could not be moved. The tracking Id is '{trackingid}'",
"Target": null,
"Details": null
At line:1 char:48

  • Get-AzureResource -ResourceGroupName adam-RG | Move-AzureResource -DestinationRe ...
  •                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : CloseError: (:) [Move-AzureResource], ErrorResponseMessageException
    • FullyQualifiedErrorId : 99,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.MoveAzureResourceComm
Copy link

@vivsriaus vivsriaus commented Jun 15, 2015

This is now fixed. Please update to latest 0.9.3

@vivsriaus vivsriaus closed this Jun 15, 2015
Copy link

@ckonig ckonig commented Jun 18, 2015

Sadly I cannot confirm that this is fixed with 0.9.3, tried it today with that version but still the behavior is the same as stated in the linked Stackoverflow question.

Copy link

@nmackenzie nmackenzie commented Jul 17, 2015

To move a VM using Move-AzureResourceGroup you need to move the containing cloud service and all its VMs at the same time. For example:

Get-AzureResource -ResourceGroupName OriginalResourceGroup | where { $_.ResourceType -match 'Microsoft.ClassicCompute' } | Move-AzureResource -DestinationResourceGroupName NewResourceGroup

By default, the resources in a cloud service are put in a resource group with the same name as the DNS name of the cloud service.

Copy link

@petrsvihlik petrsvihlik commented Jul 17, 2015

I just tried moving web apps across resource groups - which was the original issue - and it works fine in 0.9.4.

Copy link

@OliverFlux OliverFlux commented Aug 4, 2015

Hey Guys .
You know if I can move this resources ?
Resources Like , Virtual networkings , Backup Vaults .

I tried using these lines:
Get-AzureResource -ResourceId $ ResourceID | Move-AzureResource -DestinationResourceGroupName $ Name

Thanks .

Copy link

@msftbot msftbot bot commented Aug 14, 2019

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @rthorn17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.