Uninstalling Azure Arc can be a bit of a process, but it's definitely doable.
First, you'll need to understand that Azure Arc is a service that needs to be unregistered from your Azure subscription, which can be done through the Azure portal. This step is crucial to ensure a smooth uninstallation process.
You'll also need to delete the Azure Arc resources, including the servers, clusters, and other related resources. This will help you free up resources and avoid any potential conflicts.
Before you start the uninstallation process, make sure you have the necessary permissions and access to the Azure portal.
Removing Azure Arc Setup
Removing Azure Arc Setup is a relatively straightforward process that can be completed in a few steps. You can remove the Azure Arc Setup feature via Server Manager by launching the Server Manager and selecting Manage > Remove Roles and Features.
On the Sever Selection window, select the Windows server from which you want to remove the Azure Arc setup component. Click Next. On the Features page, uncheck “Azure Arc Setup“. This action will remove the Azure Arc Setup feature on the server. Click Next.
The confirmation window shows the roles and features that are about to be removed, which includes the Azure Arc Setup. In the confirmation window, click Remove. You must restart the server to finish removing this feature.
Alternatively, you can use a simple PowerShell command to remove the Azure Arc Setup: `Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup`. Note that this will also require a server restart.
Remove Setup Feature via Server Manager
To remove the Azure Arc Setup feature via Server Manager, you'll need to launch the Server Manager and select Manage > Remove Roles and Features.
On the Sever Selection window, select the Windows server from which you want to remove the Azure Arc setup component and click Next.
You'll then arrive at the Features page, where you should uncheck “Azure Arc Setup” to remove the feature from the server.
Click Next to proceed with the removal process.
The confirmation window will show the roles and features that are about to be removed, which includes the Azure Arc Setup.
Click Remove to confirm the removal of the Azure Arc Setup feature.
After removing the feature, you'll need to restart the server to finish the process.
Delete Data Controller
To delete a data controller, you'll need to follow a series of steps. First, you'll need to delete the data controller itself.
You can do this by running a command to verify the status of the data controller, which should be in a deleted state.
If you're using the Azure CLI, you'll need to delete the data controller in three steps: delete the data controller, delete the data controller extension, and delete the custom location.
Here are the steps in more detail:
- Delete the data controller by running a command.
- Delete the data controller extension using the Azure CLI or by browsing to the Overview page of your connected cluster in Azure portal.
- Delete the custom location.
Wait for a few minutes for these actions to complete, then verify the status of the data controller to ensure it's been successfully deleted.
Removing Azure Arc Extensions
Removing Azure Arc extensions is a crucial step in the uninstallation process. To remove the Azure Arc setup, you can use the PowerShell command `Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup`.
You'll also need to remove the Azure Connected Machine agent, which requires executing the command `Get-ChildItem -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -eq "Azure Connected Machine Agent"} | ForEach-Object {MsiExec.exe /x "$($_.PsChildName)" /qn}` in PowerShell.
After removing the Azure Arc setup, you'll need to restart your computer.
Using PowerShell
Using PowerShell to remove Azure Arc extensions is a quick and efficient way to do so. You can use the Disable-WindowsOptionalFeature cmdlet to disable the Azure Arc Setup feature.
The command to disable the Azure Arc Setup feature is: Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup. This will remove the Azure Arc Setup feature from your Windows Server 2022.
After running the command, you will need to restart your server to finish the removal process.
Alternatively, you can use the Enable-WindowsOptionalFeature cmdlet to enable the Azure Arc Setup feature if you need it back. The command to enable the feature is: Enable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup.
To remove the Azure Connected Machine agent, you can use the following PowerShell command: Get-ChildItem -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -eq "Azure Connected Machine Agent"} | ForEach-Object {MsiExec.exe /x "$($_.PsChildName)" /qn}. This command will uninstall the agent and you will need to restart your server afterwards.
Here are the PowerShell commands to remove and add the Azure Arc Setup feature and the Azure Connected Machine agent:
Remove Data Controller Extension
To remove the data controller extension, you need to know its name. You can find this by browsing to the Overview page of your connected cluster in Azure portal and looking under the Extensions tab, or by using the command to get a list of all extensions on the cluster.
The name of the Arc data controller extension is crucial for deletion, so make sure to note it down.
Once you have the name, delete the data controller extension by running the command:
Wait for a few minutes for the action to complete.
To verify the deletion, run the command to check the status of the data controller.
Here are the steps to delete the data controller extension:
- Get the name of the Arc data controller extension
- Delete the data controller extension using the command
- Verify the deletion by checking the status
Sources
- https://www.thomasmaurer.ch/2021/04/the-azure-arc-connected-machine-agent-azcmagent/
- https://www.prajwaldesai.com/uninstall-azure-arc-setup-windows-server/
- https://www.linkedin.com/posts/prajwaldesai_uninstall-azure-arc-setup-feature-from-windows-activity-7163525280253366272-Vdcx
- https://gabrielluiz.com/2023/10/windows-server-2022-remove-azure-arc-in-taskbar/
- https://learn.microsoft.com/en-us/azure/azure-arc/data/uninstall-azure-arc-data-controller
Featured Images: pexels.com