How To

Remove or Disable Azure Arc Setup on Windows Server 2025

Every Windows Server 2025 install ships with Azure Arc Setup turned on. A tray launcher starts at logon and a Start menu entry opens the same wizard, which downloads the Azure Connected Machine agent when it runs. Most answers to the Windows Server 2025 remove Azure Arc question still quote the Server 2022 command, and on 2025 that command fails because Arc Setup moved from an optional feature to a Feature on Demand capability. On a server that must never talk to Azure, the onboarding path shouldn’t be there at all.

Original content from computingforgeeks.com - post 180699

Below, the AzureArcSetup capability comes off with DISM and PowerShell, the tray icon goes on its own for servers that keep the wizard, and a startup task removes it again if anything reinstalls it. Do it right after a fresh Windows Server 2025 install. All of it was tested in October 2026 on Windows Server 2025 Datacenter (build 26100.32230, then 26100.33650 after the October update) with no Azure account or agent, so no step needs a subscription.

The default Azure Arc Setup footprint

Arc Setup is an onboarding wizard, not the Arc agent itself. A fresh install carries the wizard, a tray launcher and a shortcut, and nothing that connects to Azure until someone runs the wizard and signs in. That distinction matters for your risk call: removing Arc Setup closes an easy path to onboarding, but if a server already shows the Connected Machine agent, the agent is the thing to deal with first (covered further down). Make the call per server, too: Microsoft’s hotpatch documentation only offers Hotpatch to on-premises Standard and Datacenter machines that are Arc-connected, so a server you plan to hotpatch isn’t a candidate for this guide.

Check what your build carries before you change anything, because the answer decides which sections apply to you. A server that already has the agent needs the disconnect steps before anything else. Run these in an elevated PowerShell session:

Get-WindowsCapability -Online -Name AzureArcSetup* | Format-List Name, State, DisplayName, Description, DownloadSize, InstallSize
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' | Format-List AzureArcSetup, SecurityHealth
Test-Path 'C:\Program Files\AzureConnectedMachineAgent'

On our clean install the capability reported Installed, the machine-wide Run key started AzureArcSysTray.exe for every user who logs on, and the agent folder did not exist:

Windows Server 2025 Azure Arc Setup capability installed with the AzureArcSysTray Run key and no Connected Machine agent

The full footprint of the default install, as found on the lab server:

  • The capability AzureArcSetup~~~~ reports Installed.
  • C:\Windows\AzureArcSetup holds 184 files (about 6 MB) in ArcSetup and Systray.
  • The AzureArcSetup value under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run launches the tray icon at every logon.
  • Azure Arc Setup.lnk sits in the all-users Start menu.
  • No himds service and no C:\Program Files\AzureConnectedMachineAgent folder exist.

Microsoft’s Azure Arc Setup documentation confirms the tray icon launches the wizard and that the wizard fetches and installs the latest agent when it runs. Server Manager also links to the wizard from the Azure Arc Management field on its Local Server page, so a curious admin has three ways in. If the last check above returns True, someone has already onboarded this server and removing Arc Setup alone changes nothing about its Azure connection.

Server 2022 commands that fail on 2025

On Server 2022, Arc Setup was an optional component, so Disable-WindowsOptionalFeature and the Remove Roles and Features wizard handled it. Server 2025 ships it as a capability, and the optional-feature and Server Manager cmdlets no longer know the name. We ran both on the lab box so you can recognise the errors instead of guessing at a typo.

Error: “Feature name AzureArcSetup is unknown.”

Older guides and most forum answers still give the Server 2022 command. On 2025 it fails before it touches anything, so it can’t do damage, but it also can’t remove anything:

Disable-WindowsOptionalFeature -Online -FeatureName AzureArcSetup -NoRestart

DISM throws a COMException with the feature name rejected outright (trimmed here to the message and the error ID):

Feature name AzureArcSetup is unknown.
Microsoft.Dism.Commands.DisableWindowsOptionalFeatureCommand

Running Get-WindowsOptionalFeature -Online -FeatureName AzureArcSetup is worse because it fails silently: it returns nothing at all, which a script reads as “already gone”. Don’t use that check in compliance scripts on 2025, since it reports a clean server whether Arc Setup is there or not.

Error: “The role, role service, or feature name is not valid: ‘AzureArcSetup'”

On a server, plenty of admins reach for the Server Manager cmdlet first. It fails the same way:

Uninstall-WindowsFeature -Name AzureArcSetup

The NameDoesNotExist ID means the cmdlet searched the role and feature catalogue and found nothing by that name, which is accurate on 2025 (again trimmed to the message and the ID):

ArgumentNotValid: The role, role service, or feature name is not valid: 'AzureArcSetup'. The name was not found.
NameDoesNotExist,Microsoft.Windows.ServerManager.Commands.RemoveWindowsFeatureCommand

One more trap sits here: Get-WindowsFeature *Arc* on 2025 matches only System Data Archiver and Windows Search Service, because the wildcard hits “Archiver” and “Search”. An inventory built on Get-WindowsFeature won’t ever see Arc Setup on this release, so audit with Get-WindowsCapability instead.

Windows Server 2025 Azure Arc Setup removal

Removing the capability is the control that closes the onboarding path: the wizard, the tray launcher, the Run value and the shortcut all go with it. It needs a reboot to finish, so schedule it into a maintenance window rather than running it on a live server at lunchtime. Microsoft documents the DISM form:

dism /online /Remove-Capability /CapabilityName:AzureArcSetup~~~~ /NoRestart

On our 2-vCPU VM the removal took 166.7 seconds, and the progress bar sat at 88.5% for most of that time, which looks like a hang but isn’t. The run ends with a success message and exit code 3010, which means a reboot is required:

Deployment Image Servicing and Management tool
Version: 10.0.26100.5074

Image Version: 10.0.26100.32230

[==========================100.0%==========================]
The operation completed successfully.

Don’t stop at “completed successfully”. Until the reboot nothing visible has changed, and a change ticket closed at this point records a removal that hasn’t happened yet. Check the state:

Get-WindowsCapability -Online -Name AzureArcSetup* | Format-List Name, State

The state moves to UninstallPending, while all 184 files, the Run value and the Start menu shortcut are still in place:

Name  : AzureArcSetup~~~~
State : UninstallPending

The PowerShell equivalent does the same job and suits scripts better, because it returns an object with RestartNeeded instead of an exit code:

Remove-WindowsCapability -Online -Name 'AzureArcSetup~~~~'

Microsoft also lists a GUI route, Settings, System, Optional features, AzureArcSetup, Remove. We used the command line throughout, since it’s the form you can push to many servers and log. Reboot when you’re ready:

Restart-Computer

Expect a servicing screen during shutdown. On the lab VM, which we restarted from the hypervisor, the console showed the update progress text before the restart, and the server was back up 4 minutes 40 seconds after the reboot was issued:

Windows Server 2025 servicing screen while the Azure Arc Setup removal finishes during reboot

After the restart, verify every piece of the footprint, not only the capability state:

Get-WindowsCapability -Online -Name AzureArcSetup* | Format-List Name, State
Test-Path C:\Windows\AzureArcSetup
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' | Format-List AzureArcSetup, SecurityHealth
Test-Path 'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Azure Arc Setup.lnk'

A clean removal reports NotPresent, both paths return False, and only the Windows Security entry is left in the Run key:

Name  : AzureArcSetup~~~~
State : NotPresent

False

SecurityHealth : C:\WINDOWS\system32\SecurityHealthSystray.exe

False

Anything other than NotPresent means the removal isn’t finished, and a server you report as clean is still carrying the wizard. Restart again from inside Windows, re-run the same four checks, and don’t sign the change off until all four agree.

The tray icon on its own

Some teams do want Arc on a few servers later and only object to the nag at every logon. For those, delete the Run value and leave the capability installed. The wizard stays reachable from the Start menu and Server Manager, so this is a cosmetic fix, not a control:

Remove-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' -Name AzureArcSetup

The cmdlet prints nothing on success, so confirm the value is gone rather than trusting the silence:

Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' | Select-Object AzureArcSetup, SecurityHealth | Format-List

The AzureArcSetup line comes back empty:

AzureArcSetup  :
SecurityHealth : C:\WINDOWS\system32\SecurityHealthSystray.exe

The deletion survived a plain reboot on our server, with the capability still Installed. It didn’t survive a reinstall of the capability, though: when we added Arc Setup back, the Run value returned with it. Treat the tray-only fix as something you re-apply. The startup task below removes the whole capability, so on a server that keeps the wizard, cut the script down to its first block, the one that deletes the Run value.

A reinstall pulls 274 MB from Windows Update

We re-added the capability to see what a reinstall costs and whether anything blocks it. Nothing did. Add-WindowsCapability ran for 1,157 seconds, and the CBS log shows it downloading 274,392,102 bytes from Windows Update to restore a 6 MB wizard, and it references the October cumulative update package (KB5126646) while it works:

Add-WindowsCapability -Online -Name 'AzureArcSetup~~~~'

The cmdlet asks for a restart, and the capability sits in InstallPending until you give it one:

Path          :
Online        : True
RestartNeeded : True

After that reboot the capability was Installed again, with the folder, the Run value and the shortcut all restored. So any admin with local rights, or any deployment script that adds capabilities, can bring Arc Setup back in about 20 minutes plus a reboot on a server that can reach Windows Update. We also searched every ADMX file in C:\Windows\PolicyDefinitions (222 of them on this build) for an Arc Setup setting and found none. There’s no inbox Group Policy that keeps Arc Setup off, so the enforcement has to be yours.

A startup task that keeps it removed

The control that holds is a small script that runs as SYSTEM at startup and once a day: it deletes the tray Run value if it reappears and removes the capability if its state is Installed. It logs every run, so you have evidence for an audit instead of a belief. Create a folder for it first:

New-Item -ItemType Directory -Path C:\ProgramData\ArcGuard -Force

Open a new script file in that folder:

notepad C:\ProgramData\ArcGuard\Remove-AzureArcSetup.ps1

Paste this script, which is the exact file that ran on the lab server:

$ErrorActionPreference = 'Stop'
$log = 'C:\ProgramData\ArcGuard\arcguard.log'
$run = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
if (Get-ItemProperty $run -Name AzureArcSetup -ErrorAction SilentlyContinue) {
    Remove-ItemProperty $run -Name AzureArcSetup
    Add-Content $log "$(Get-Date -Format o) removed Run value AzureArcSetup"
}
$cap = Get-WindowsCapability -Online -Name 'AzureArcSetup~~~~'
if ($cap.State -eq 'Installed') {
    Remove-WindowsCapability -Online -Name 'AzureArcSetup~~~~' | Out-Null
    Add-Content $log "$(Get-Date -Format o) removed AzureArcSetup capability, reboot pending"
} else {
    Add-Content $log "$(Get-Date -Format o) AzureArcSetup state $($cap.State), nothing to do"
}

Lock the folder down before the task exists, because a task that runs a writable script as SYSTEM is a privilege escalation waiting to happen. A new folder under ProgramData inherits an entry that lets the Users group create files and subfolders in it; the script itself came out read-only for Users on our server, but there’s no reason to leave the folder open. Strip inheritance and grant only SYSTEM and Administrators:

icacls C:\ProgramData\ArcGuard /inheritance:r /grant:r 'SYSTEM:(OI)(CI)F' 'Administrators:(OI)(CI)F'

Check the result with icacls C:\ProgramData\ArcGuard. It should list exactly two entries, both with full control:

C:\ProgramData\ArcGuard BUILTIN\Administrators:(OI)(CI)(F)
                        NT AUTHORITY\SYSTEM:(OI)(CI)(F)

Then register the task. The startup trigger catches a reinstall that a reboot just finished, and the daily 03:00 trigger catches one on a server that rarely restarts:

$action  = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-NoProfile -ExecutionPolicy Bypass -File C:\ProgramData\ArcGuard\Remove-AzureArcSetup.ps1'
$trigger = @((New-ScheduledTaskTrigger -AtStartup), (New-ScheduledTaskTrigger -Daily -At 3am))
Register-ScheduledTask -TaskName 'ArcGuard' -Action $action -Trigger $trigger -User 'SYSTEM' -RunLevel Highest -Description 'Keeps Azure Arc Setup off this server'

Run it once by hand instead of waiting for the next reboot, so you see a log line today rather than trusting that the task works:

Start-ScheduledTask -TaskName ArcGuard

We tested it on the server where Arc Setup had just been reinstalled. The task finished in 160 seconds with result 0 and left the capability in UninstallPending. After the next reboot, the startup trigger fired again and found nothing to do. The log tells the whole story:

ArcGuard scheduled task log on Windows Server 2025 showing Azure Arc Setup removed and NotPresent after reboot

Know the limit of this design: the task removes Arc Setup, but the removal only completes at the next reboot, so a reinstalled wizard stays usable until then. On an Active Directory domain, the same file and task can go out through Group Policy Preferences (a Files item for the script and a Scheduled Task item for the task). We didn’t test the GPO delivery in this lab, which had no domain controller, so pilot it on one OU before you apply it widely.

The October cumulative update test

The worry with any removal on Windows is that the next cumulative update quietly puts the component back. So we left the server with Arc Setup removed and the guard installed, and let Windows Update install everything it offered: the October security update KB5126646 (build 26100.33650), the .NET Framework update KB5127690, a Windows Security platform update and the Malicious Software Removal Tool. The download took 221 seconds, and the install ran for 2,595 seconds on 2 vCPUs before asking for a restart.

Plan the window for two restarts, not one. Windows applied the update at shutdown, booted, showed “Updates are underway. Please keep your computer on.” and restarted itself again before the logon screen came up. Once it settles, confirm the new build and the Arc Setup state together:

$v = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
"build $($v.CurrentBuild).$($v.UBR)"
Get-WindowsCapability -Online -Name AzureArcSetup* | Format-List Name, State
Test-Path C:\Windows\AzureArcSetup
Get-Content C:\ProgramData\ArcGuard\arcguard.log -Tail 2

The update did not bring anything back. The capability stayed NotPresent, the folder, the Run value and the shortcut stayed gone, and the guard’s startup run logged nothing to do:

build 26100.33650

Name  : AzureArcSetup~~~~
State : NotPresent

False
2026-10-30T22:37:00.1909391+00:00 AzureArcSetup state NotPresent, nothing to do
2026-10-30T23:35:17.5311771+00:00 AzureArcSetup state NotPresent, nothing to do

That’s one monthly update on one build, not a promise for every future release, and a feature update is a bigger change than a cumulative one. Repeat the check after each Patch Tuesday, which is easy to schedule if your servers already take updates from a WSUS server: approve, install, restart twice, then read the log.

Servers already connected to Azure Arc

Removing Arc Setup doesn’t disconnect a server that someone already onboarded. The Connected Machine agent (service himds, folder C:\Program Files\AzureConnectedMachineAgent) keeps running and keeps the Azure resource alive. Microsoft’s agent uninstall guide sets the order, and skipping a step leaves something behind:

  1. Remove every VM extension deployed to the server.
  2. Run azcmagent disconnect as an administrator, which deletes the Azure resource.
  3. Uninstall Azure Connected Machine Agent from Programs and Features or with msiexec /x.
  4. Remove Arc Setup and install the guard task as above.

Microsoft notes that the agent uninstall leaves the C:\Program Files\AzureConnectedMachineAgent folder on disk, so the audit check below will flag it until you delete it. Our lab server never had the agent, so we did not run these four steps ourselves. If the Azure resource was already deleted, Microsoft documents azcmagent disconnect --force-local-only to clear the local state without contacting Azure. Don’t run a plain disconnect on Arc VMs hosted on Azure Local, where Microsoft warns it deletes the VM in Azure and on premises; those take --force-local-only only.

Audit checklist for an Arc-free server

Run this list after the first removal, after every cumulative update and whenever a server is rebuilt from a template:

  1. Get-WindowsCapability -Online -Name AzureArcSetup~~~~ reports NotPresent, not UninstallPending.
  2. Test-Path C:\Windows\AzureArcSetup returns False.
  3. The HKLM Run key has no AzureArcSetup value.
  4. The all-users Start menu has no Azure Arc Setup.lnk.
  5. No himds service exists and C:\Program Files\AzureConnectedMachineAgent is absent.
  6. The ArcGuard task shows LastTaskResult 0 in Get-ScheduledTaskInfo.
  7. C:\ProgramData\ArcGuard\arcguard.log has a line from the last boot.
  8. Only administrators and SYSTEM can write to C:\ProgramData\ArcGuard.

If you build servers from a golden image, remove Arc Setup in the template itself, because every clone then starts clean and the guard task becomes a backstop rather than the first line. Our Windows Server template on Proxmox walkthrough is a good place to add the step, right before the image is generalised. Browser-based management of the same servers from your own network is what Windows Admin Center is for, with no Azure resource in the picture.

Keep reading

Create a Bootable Windows 11 USB and Install Windows 11 Windows Create a Bootable Windows 11 USB and Install Windows 11 Set Up a Samba Share on Windows 11 and Access It from Linux Networking Set Up a Samba Share on Windows 11 and Access It from Linux Create Disk Partitions in Windows Using diskpart Windows Create Disk Partitions in Windows Using diskpart Windows LAPS Setup with Group Policy on Windows Server 2025 Security Windows LAPS Setup with Group Policy on Windows Server 2025 Windows Run Commands Cheat Sheet: .msc, .cpl, ms-settings (PDF) Cheat Sheets Windows Run Commands Cheat Sheet: .msc, .cpl, ms-settings (PDF) Enable TPM 2.0 on KVM and Install Windows 11 Security Enable TPM 2.0 on KVM and Install Windows 11

Leave a Comment

Press ESC to close