This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.

Prerequisites:

  • An on-boarded and arc-enabled Azure Stack HCI cluster

GUI - Way:

PowerShell - Way:

First Steps:

First of all, you should check, if all necessary modules are installed.

# Required PowerShell module
Install-Module -Name Az.StackHCI

This module should already be present on an HCI node.

Basically, it is recommended to work from a cluster node.

Disconnect from Azure Arc:

# Disconnect from cluster-node
azcmagent disconnect

# Force disconnect from cluster-node (locally)
azcmagent disconnect --force-local-only

Unregister Cluster:

# Unregister from cluster-node
Unregister-AzStackHCI -SubscriptionId "<subscription ID GUID>" -ResourceName <Name>

If you want to delete all Azure resources that are linked to the cluster, you may also need to remove:

  • A Log Analytics Workspace
  • A Witness Disk (Azure Storage Account)
  • All Insight related resources

References:

Connect Azure Stack HCI to Azure - Azure Stack HCI
How to register Azure Stack HCI clusters with Azure.
Managing the Azure Arc-enabled servers agent - Azure Arc
This article describes the different management tasks that you will typically perform during the lifecycle of the Azure Connected Machine agent.