An Azure service that is used to provision Windows and Linux virtual machines.
Hello @Jason Setzer
The key issue here is OS support. Microsoft's current documentation lists Windows Server 2016 and later as supported for both Managed Run Command and Action Run Command. Windows Server 2008 R2 is not in the supported OS list, even if the Azure Guest Agent currently reports Ready.
The Deleting/Creating + Pending combination, along with “run command extension execution is in progress,” suggests the Run Command control-plane/agent state hasn't reconciled. Normally, Managed Run Command exposes ProvisioningState for extension provisioning and InstanceView.ExecutionState for the actual script execution.
Since you've deliberately avoided restarting, deallocating, reapplying, or modifying the agent, do not submit another Run Command yet. The platform is already reporting an execution in progress, so another request could further complicate the state.
Since this is Windows Server 2008 R2 and the documented Run Command prerequisites no longer include it, I recommend opening an Azure VM support case and privately providing the resource IDs, Run Command names, timestamps, and Activity Log correlation IDs. Ask Microsoft to verify whether the orphaned Run Command resources can be reconciled from the backend and whether the Pending execution can still be dispatched.
Do not restart/reinstall the VM Agent solely to clear this condition until Microsoft reviews it, particularly on this legacy OS.
References:
Managed Run Command for Windows VMs
Action Run Command for Windows VMs
Help make this community better for everyone: if this answer resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution.