Cannot remove AzureMonitorWindowsAgent extention from arc connected premise server

Mikael Braad Nielsen 21 Reputation points

Hi there

i had a previous installed instance of AzureMonitorWindowsAgent on a windows server 2012 R2.

Then i recreated the arc ressource in azure and tried to install the arc agent and extention again, but with no luck

"status": "Failed",
"error": {
"code": "HCRP400",
"message": "Extension failed to install. Extension must be removed before any further requests on this extension will be accepted. Install of extension failed with error: Extension Microsoft.Azure.Monitor.AzureMonitorWindowsAgent of type: AzureMonitorWindowsAgent already exists on the box under a different name. You must execute a delete request before any new requests can be processed for this extension type. Extension Message: ExtensionOperation:uninstall. Status:Success"

I tried
Remove-AzConnectedMachineExtension -MachineName "ServerName" -ResourceGroupName "rg-name" -Name AzureMonitorWindowsAgent

But it can no longer find the machineName.

How do i delete this extension from the server ?

Thank you in advance.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,066 questions
Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
165 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andrew Blumhardt 8,106 Reputation points Microsoft Employee

    Did you remove Arc from the local server in add-remove programs? Maybe remove the local install then rejoin to Arc. It is not unlike joining a computer to a domain. There is a managed identity that needs to be in sync.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful