fails with "[UnexpectedError] No Windows console found. Are you running cmd.exe?" error when $itemPath has spaces and square brackets (unsure if that is the cause ...
We use az vm run-command invoke to run scripts on a VM before turning it into an image. Instead of actually running our supplied scripts (whether or not they're inline code or sourced from a file via ...