An Azure service that is used to provision Windows and Linux virtual machines.
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.
- 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.
- 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:
This helps confirm whether the bootstrap completed and whether the delete operation is blocked by a command parsing or extension-side issue.C:\WindowsAzure\Logs\Plugins - Remove the Action Run Command Windows extension using the supported removal command.
- PowerShell:
Invoke-AzVMRunCommand -ResourceGroupName 'rgname' -VMName 'vmname' -CommandId 'RemoveRunCommandWindowsExtension'- CLI:
This is the documented removal method for the Run Command Windows extension and is specifically intended for troubleshooting extension issues.az vm run-command invoke --command-id RemoveRunCommandWindowsExtension --name vmname -g rgname - Re-run a Run Command only after the extension is cleared.
- When Run Command is applied again, the extension is installed automatically.
- 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.
- 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
\ncan be misinterpreted as a newline. - A custom
HKLM\SOFTWARE\Microsoft\Command Processor\AutoRunsetting can break Run Command install or enable phases.
- Reserved characters such as
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: