Are we talking about the same thing?
Hereby a small summary of the error message, so that we know for sure that we are talking about the same thing.
I want to add new servers in Azure Automation – Update Management. I get one of these error messages while adding to Update Management:
The solution cannot be enabled on this VM because the VM already has the management agent but the workspace associated with the agent cannot be found within the subscription.
Cannot enable – VM Reports to workspace ‘OTHERWORKSPACE’.
The Virtual Machine is already linked to another Workspace(OMS) in your own subscription, but can also be linked to workspace(OMS) in another subscription.
Just let me enable Update Management in Azure Automation.
Okay the solution is pretty easy.
When you add a Virtual Machine to a Workspace, or Azure Automation, the server is then automatically linked to the OMS that is linked to Azure Automation, the Virtual Machine receives a new Extension: “Microsoft Monitoring Agent”.
If you remove the Microsoft Monitoring Agent extension from the VM, the Virtual Machine is disconnected from the Workspace(OMS), and you can then link the Virtual Machine with Azure Automation Update Management.
Please guide me through the steps!
Go to the virtual machine in Azure “Virtual Machines”
Search in the VM menu for Extensions.
Here you can see the Microsoft Monitoring Agent.
Click on the 3 dots and choose uninstall.
Click Yes to remove the extension.
As you can see in the screenshot below, the Extension will now be removed.
When you now go back to Azure Automation – Update Management, or go to Update Management via the VM, you will see that you can add the VM to Azure Automation.
I happened to encounter this problem in my own test environment. The Servers that you see in the screenshots are from my test environment.
I sometimes connect a server to a client or to test a script like that. The first time I ran into this, I did a bit of troubleshooting before I found this.
Now that I came across it again, I thought why didn’t I actually make a blog post of it?