How to remove a server from Azure Arc
Azure Arc allows an on-prem server to managed through Azure. If you want to remove this server from Azure Arc you need to follow a few simple steps as outlined below.
Instructions
First, Remove any VM Extensions
Log into Azure at portal.azure.com
Click on Resource Groups
Find Arc-Servers resource group and click on it
Note: Arc-Servers is the name we assigned to this resource group. It is not a default group.The Resource group includes Servers and other resources associated with those servers like Databases.
Some of the resources include Machine - Azure Arc, SQL Server - Azure Arc and SQL Database - Azure ArcType in the word camera into the search box. Then click on SH-CAMERASTN01.
Click on Extensions. It may not be visible initially. In that case, click on the dropdown menu arrow next to Settings.
- The extensions are displayed
Select the first one and click on Uninstall.
Confirm that you want to uninstall the extension by clicking Yes.
Eventually, the selected extension will be uninstalled successfully and will drop off the display listing.
Repeat the process for all remaining extensions.
Second, disconnect the agent from Azure Arc.
Log into the server in question with an account that is both a local admin on the server and an admin in Azure.
Open a Powershell admin window and run this command,
azcmagent disconnect
.- Pick your admin account.
Eventually you will see this message.
Returning to the Powershell window, you should see that you have successfully deleted the resource from Azure.
Third, uninstall the agent
Type in add in the search bar and then click on Add or remove programs
Find Azure Connected Machine Agent from the list and click on the Uninstall button.
Click on Uninstall again.
It will uninstall quickly and drop off the list. You are done.