While working with the Invoke-AzVmRunCommand cmdlet, I encountered a problem, receiving the following error:
Invoke-AzVMRunCommand : Long running operation failed with status 'Failed'. Additional Info:'VM has reported a failure w hen processing extension 'RunCommandWindows'. Error message: "Finished executing command".'
I’m attempting to push a DSC configuration into a VM and run it, and although the PowerShell runs successful when run from inside the VM, I still see this error.
I came across a github issue with a helpful tip: the log output of Invoke-AzVmRunCommand can be viewed from this path:
This helped me determine what the problem was and how to solve it.