Sometimes you have to move Azure resources to a new subscription. One reason could be that your current subscription will end and you have a new one, which you want to use. Another reason could be that you need to migrate it to a subscription of someone else (demerger, etc.).
Anyhow if you do not want to loose the connection with your SCOM environment or your directly connected agents, how can I get this done? One way is always PowerShell, but I want to show you here, how you can do that within the Azure portal.
So open up http://portal.azure.com and Login.
Then go to Log Analytics and check which resource group you need to move.
Now go to Resource Groups and select your resource group (here OMS).
In the Details view of the resource group you will have at the top the Move button.
You can now select all resources which belong to this resource group.
Select the new subscription and create a new resource group or select an existing one in the new subscription.
The problem which we get now is that the validation fails. Why? When you have Solutions selected in your OMS environment, which you normally have, then these cannot be moved. You need to remove them first and then the move works. The error gives the details:
Error: Resource move is not supported for resources that have plan. Resources are ‘Microsoft.OperationsManagement/solutions/ADAssessment(Lab),Microsoft.OperationsManagement/solutions/ADReplication(Lab),Microsoft.OperationsManagement/solutions/AgentHealthAssessment and tracking id is ‘xxx’. (Code: ResourceMoveFailed)
So open up OMS (http://oms.microsoft.com/oms) and remove your Solutions.
When you check in the azure portal, then you will see that the resource is deleted after the solution is removed. Do that for all Solutions in your OMS resource.
At the end it should look like this, when you click Move again:
Do not miss to select the check box at the bottom.
Then click OK.
The old resource group will be empty when the move task is finished. So you can delete it afterwards.
You can then enable the OMS solutions again, now that all your OMS resources are in the new resource group.
The necessarity to remove the solutions from OMS can be a problem in productive environments, not for test environments. So be cautious there.