Azure RunCommandWindows extension stuck in Deleting state

Kannan Ramaswamy 0 Reputation points
2026-09-29T17:39:17.9233333+00:00

I have an Azure Windows Server 2022 VM named AxiomQuant-Build in Central India.

The VM is running and the Azure VM Agent is Ready. The Microsoft.CPlat.Core.RunCommandWindows extension became stuck in the Deleting state after an Action Run Command operation.

The Run Command bootstrap script itself completed successfully and reported:

"AXIOMQUANT BOOTSTRAP COMPLETE"

Azure diagnostics report that the resource operation completed with terminal provisioning state "failed", but the automated diagnostics could not pinpoint the specific issue.

I need help clearing the stuck RunCommandWindows extension operation safely.

Please advise how to recover the VM extension without restarting, redeploying, resizing, or depleting the VM.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-09-29T17:39:41.14+00:00

    For a stuck Microsoft.CPlat.Core.RunCommandWindows extension in Deleting state, the supported recovery path that avoids restart, redeploy, resize, or deallocation is to remove the Action Run Command Windows extension explicitly, then let it reinstall automatically on the next Run Command invocation.

    1. Confirm the extension status.
      • Azure portal: VM → Settings → Extensions
      • Or use CLI:
         az vm extension show -g <RG Name> --vm-name <VM Name> --name <Extension Name>
      
      • For this case, the extension name is the Run Command Windows extension.
    2. Check the Run Command extension log inside the VM before removal.
      • Log path:
         C:\WindowsAzure\Logs\Plugins\Microsoft.CPlat.Core.RunCommandWindows\<version>\RunCommandExtension.log
      
      • General extension logs are also under:
         C:\WindowsAzure\Logs\Plugins
      
      This helps confirm whether the bootstrap completed and whether the delete operation is blocked by a command parsing or extension-side issue.
    3. Remove the Action Run Command Windows extension using the supported removal command.
      • PowerShell:
         Invoke-AzVMRunCommand -ResourceGroupName 'rgname' -VMName 'vmname' -CommandId 'RemoveRunCommandWindowsExtension'
      
      • CLI:
         az vm run-command invoke --command-id RemoveRunCommandWindowsExtension --name vmname -g rgname
      
      This is the documented removal method for the Run Command Windows extension and is specifically intended for troubleshooting extension issues.
    4. Re-run a Run Command only after the extension is cleared.
      • When Run Command is applied again, the extension is installed automatically.
    5. If the extension still remains stuck after the removal command, inspect broader VM extension health.
      • Verify the Azure VM Agent remains Ready.
      • Review C:\WindowsAzure\Logs\WaAppAgent.log.
      • Review extension status again in Extensions + applications.
      • If another extension is in a failed provisioning state, it can interfere with new extension operations.
    6. Check for known Run Command Windows issues if the extension reinstalls but fails again.
      • Reserved characters such as & in parameters must be escaped as ^&.
      • Paths containing \n can be misinterpreted as a newline.
      • A custom HKLM\SOFTWARE\Microsoft\Command Processor\AutoRun setting can break Run Command install or enable phases.

    Risk note: avoid registry changes unless the log indicates the AutoRun issue, because incorrect registry edits can affect command execution system-wide.

    If the extension operation is truly stuck at the platform operation layer and does not clear with the documented removal command, the available context only confirms that some stuck Run Command cancelling operations were resolved by backend intervention rather than a self-service step.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.