How to Uninstall Azure Arc from Windows Server 2026

Why do we need to Uninstall Azure Arc or Azure Arc Setup? Windows Server 2025 ships with the Azure Arc Setup feature baked in. You’ll notice a new tray icon and an optional-features entry even if you never intended to connect to Azure. For environments where cloud integration isn’t desired—or simply to reclaim resources—you can fully uninstall Azure Arc Setup and its agents.

Historical Context – The Evolution of Windows Server

Since Windows Server 2022, Azure Arc has been shipped as an “Optional Component.” With update KB 5031364, it was quietly installed on all systems including a system tray icon.

This design has now been overhauled in Windows Server 2025:

  • On Server 2022: AzureArcSetup was delivered as a graphical feature with an icon in the taskbar.
  • On Server 2025: It’s integrated into Settings → System → Optional Features and can be removed cleanly

This shift is a response to community feedback as we all want Opt-In and not Opt-Out functionality added to our systems once we are “in production”.

Why Uninstall Azure Arc Setup?

Azure Arc enables powerful hybrid scenarios—Hotpatching, Azure Update Manager, centralized governance, hot-patch without reboot, and more. But not every server should phone home:

  • Security policies may forbid outbound cloud connections
  • Tray notifications and background services can clutter the UI
  • You may simply not need Arc-based patching or monitoring

If your Windows Server 2025 instance is destined to stay on-premises and self-managed, uninstalling Azure Arc Setup returns it to a “cloud-free” state and eliminates concerns or upcoming discussions about your server being cloud connected.

IMPORTANT: Please be aware that this feature is called AzureArcSetup. It is important to mention that every Windows Server 2025 standard installation does not include an Azure Arc Connected Machine Agent or a cloud connectivity. This feature does only allow for quick onboarding and will download the current Azure Arc Connected Machine Agent when executed. There is no reason for Cloud security concerns even with this component installed.

Step-by-Step: Removing the Azure Arc Setup Feature

Prerequisites

  1. Ensure you have local administrative rights.
  2. If the server is already Arc-enabled, plan to delete its Azure resource after disconnection.
  3. Backup any custom scripts or monitoring configurations dependent on Azure Arc

Using the GUI to remove the Azure Arc Setup Feature

This is very straight forward and only requires three steps.

Open Settings → System → Optional Features.

Select AzureArcSetup, click Remove.

Uninstall Azure Arc Agent Setup through GUI
Uninstall Azure Arc Agent Setup through GUI

Reboot the server

Using PowerShell to uninstall Azure Arc Setup Feature – 2026

You can uninstall Azure Arc using a PowerShell module. This is a better end-user experience which provides more readable progress and built-in confirmation compared to raw DISM syntax.

This is an update based on feedback from the MVP Karl Wester-Ebbinghaus.

# Remove the Azure Arc optional feature
Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup -NoRestart

# Or on Windows Server 2025 and up
Remove-WindowsCapability -Online -Name AzureArcSetup~~~~

Below is the legacy dism command from my 2025 version, that you can find here.

DISM /online /Remove-Capability /CapabilityName:AzureArcSetup~~~~

Uninstalling Azure Arc Setup from Windows Server 2022

The Setup has no impact on your machine until it is configured. If you want to, you can remove it by running the following PowerShell command.

Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup
Uninstalling using the GUI on the server is done using the Remove Roles and Features Wizard.
Remove Azure Arc Setup through the GUI on Windows Server 2022
Remove Azure Arc Setup through the GUI on Windows Server 2022

Uninstalling the Azure Connected Machine Agent

I started this guide with the legacy version, but you want to use the Wim Matthyssen script provided to the community as your preferred option.

Disconnect from Azure

A) Disconnect the Azure Arc Connected Machine Agent using PowerShell

azcmagent disconnect

In case the one or multiple of these do apply:

  • The machine is already deleted in Azure
  • The service principal is gone
  • The subscription is inaccessible
  • You are doing mass cleanup

you can also force the disconnect using this command:

azcmagent disconnect --force-local-only

Important: Always disconnect the Azure Arc agent before uninstalling it. Otherwise, the machine object remains in Azure as an orphaned resource.

I use the optional –use-device-code for smoother auth if needed. Link: learn.microsoft.com

The preferred “Wim Matthyssen way” to uninstall the Azure Connected Machine Agent

There’s a PowerShell script that automates full cleanup of the Connected Machine Agent and its installed extensions before disconnect. This is especially useful if you want a true clean slate beyond just azcmagent disconnect and MSI removal — it stops services, removes leftover folders (e.g., C:\Packages\Plugins*AzureMonitor*), and cleans registry keys.

See the community script by Wim Matthyssen for a concrete example and full details here.

Use PowerShell (The Modern Way) to Uninstall Azure Arc

Instead of using the slow and legacy Win32_Product WMI class (which triggers consistency checks on all installed software), use the modern PackageManagement commands built into Windows.

$pkg = Get-Package -Name "Azure Connected Machine Agent" -ErrorAction SilentlyContinue

if ($pkg) {
    Write-Host "Found $($pkg.Name). Uninstalling..."
    $pkg | Uninstall-Package -Force
    Write-Host "Successfully uninstalled $($pkg.Name)"
} else {
    Write-Host "Agent not found."
}

The legacy way of uninstalling the Azure Connected Machine Agent

Uninstall the Azure Connected Machine Agent using PowerShell and the Win32_Product WMI class.

Important: I wouldn’t use this approach anymore. It has proven to be slow and cause side effects. The reasons for this are:

  • This procedure does trigger a MSI consistency checks on all installed products
  • Can reconfigure or repair unrelated software
  • Is slower on production systems
  • Generates MSIInstaller events
# Find Azure Connected Machine Agent
$agent = Get-CimInstance -ClassName Win32_Product |
    Where-Object { $_.Name -like "Azure Connected Machine Agent*" }

if ($agent) {
    Write-Host "Found: $($agent.Name)"
    Write-Host "Product ID: $($agent.IdentifyingNumber)"
    Write-Host "Starting uninstall..."

    # Execute uninstall
    $result = $agent.Uninstall()

    if ($result.ReturnValue -eq 0) {
        Write-Host "Uninstallation completed successfully."
    }
    else {
        Write-Host "Uninstallation failed. Return code: $($result.ReturnValue)"
    }
}
else {
    Write-Host "Azure Connected Machine Agent not found."
}

or Uninstall the Agent via Control Panel

Open Control Panel → Programs → Uninstall a program.

  • Find Azure Connected Machine Agent and uninstall it.

or use my legacy Command Line / Script:

# Identify and uninstall the product using its registry key:
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* |
  Where DisplayName -eq "Azure Connected Machine Agent" |
  ForEach-Object { MsiExec.exe /x "$($_.PSChildName)" /qn }

# Alternatively, if you know the GUID:
msiexec.exe /x {GUID} /qn

This PowerShell will search for the Registry key shown below and give you the GUID.

Registry Key for GUID of Azure Arc Connected Machine Agent
Registry Key for GUID of Azure Arc Connected Machine Agent to Uninstall Azure Arc

Remove the Folders and Registry

Even after uninstallation, some remnants are left behind:

  • C:\Program Files\AzureConnectedMachineAgent\
  • C:\ProgramData\AzureConnectedMachineAgent\
  • Potential plugin folders like C:\Packages\Plugins\… or C:\ProgramData\GuestConfig\

Recommended steps:

  • Disconnect the Azure Arc connected machine Agent from Azure
  • Stop all agent-related services and background processes.
  • Manually delete leftover folders.
  • Clean registry entries (e.g., Uninstall keys) by search for the GUID used earlier or “Azure Connected Machine Agent”
  • Reboot the machine to ensure a clean state.

The manual cleanup process is quite complex, this is why i recommend to use the scripts by Wim Matthyssen.

Clean Up Azure Resources and Extensions

After removing the local agent, finish cleanup in Azure:

  1. Delete Arc extensions
    Use Remove‑AzConnectedMachineExtension to remove leftover extensions like AzureMonitorWindowsAgent (learn.microsoft.com).
  2. Delete the Azure resource itself
    If the resource appears offline in Azure, remove it from the resource group manually.

More details on how to uninstall all components can be found here on learn.microsoft.com

✅ Final Checklist

StepDescription
1Remove the GUI feature AzureArcSetup
2Disconnect the server using azcmagent disconnect
3Uninstall the agent via Control Panel or script
4Manually clean up files and registry
5Remove extensions and delete the Azure resource

This ensures your Windows Server 2025 system is clean and free of Azure Arc components.

Post-Removal Considerations for Uninstall Azure Arc

  • Hotpatch & Azure Update Manager
    Windows Server 2025’s No-Reboot Hotpatch requires Azure Arc and Virtualization-based Security (VBS). Once Arc is removed, Hotpatch and Azure Update Manager integrations are no longer available. Learn more in the Hotpatch for Azure Arc–enabled servers guide.
  • Security & Monitoring
    Any Azure Monitor or Log Analytics extensions deployed via Arc need manual cleanup in Azure. Delete stale Data Collection Rule associations and VM extensions in the portal.
  • Future Updates
    As Microsoft evolves Server 2025, Arc agents may receive new capabilities. By removing the inbox setup, you won’t automatically get those updates—plan accordingly if you ever decide to re-onboard.

Conclusion

Uninstalling Azure Arc on Windows Server 2025 takes just a handful of steps. By disconnecting first, then cleaning up agents, capabilities, files and registry entries, you restore a fully on-premises server footprint.

I’d love to hear how your cleanup went and why you started the process. Message me via LinkedIn, Mastodon, Bluesky or join the Adaptive Cloud Community on Reddit. Let’s keep combining the best of the past with what works today. Top get started with Windows Server 2025 check my guide here.

Spread the knowledge
Avatar for Andreas Hartig
Andreas Hartig - MVP - Cloud and Datacenter Management, Microsoft Azure

Related Posts

IT Network Dragon and show the Unifi Gateway Config and the Azure Portal on a Dual Screen

VPN Ubiquiti UniFi UDM to Azure (2026 Edition)

Update: This guide replaces my original article located here with this VPN Ubiquiti UniFi UDM to Azure (2026 Edition). In the past, we relied on the Basic VPN Gateway and … Read more

Spread the knowledge
Read more
ChatGPT Image 15. Nov. 2025, 19 38 10

Timing & Trust in Architecture: My View on Secure Future Initiative Progress Report 2025

In this article you’ll explore how security, governance and lifecycle risk converge in modern infrastructure, why the recent Microsoft SFI report matters for hybrid-cloud and on-prem environments, and how you … Read more

Spread the knowledge
Read more
Dragon Secure a Tier 0 Resource

Azure Arc – Secure a Tier 0 resource – 2025

Secure a Tier 0 resource in 2025 and why traditional ESAE architectures solved early Tier 0 challenges but are no longer sufficient in an era of hybrid and cloud-native identities. … Read more

Spread the knowledge
Read more
M365 Local Dragon

Why Microsoft 365 Local Matters: A Real Future for Disconnected & Sovereign On-Premises Environments

Why Microsoft 365 Local? With Microsoft 365 Local now generally available, Microsoft sends a strong signal: on-premises and sovereign-cloud footprints are not legacy baggage — they remrain strategically relevant. Together … Read more

Spread the knowledge
Read more
Shadowrun style cyber dragon Test Latency to Azure Regions 2025

Test Latency to Azure Regions 2025

Test Latency to Azure Regions, if users feel your app is “slow,” as nine times out of ten they’re feeling latency, not CPU. In Azure, that latency comes from three … Read more

Spread the knowledge
Read more
dragon IT architect from the Shadowrun world enjoying some lively YouTube sessions on Azure Arc

Joining the Azure Arc Community – Resources and My Top Picks

The Azure Arc Community brings together everyone interested in the Azure management for any infrastructure—on-premises, multicloud, and at the edge. The core of the community for me is Azure Arc … Read more

Spread the knowledge
Read more