Azure runbook to start/stop a vm says "Completed" but nothing happens Azure runbook to start/stop a vm says "Completed" but nothing happens powershell powershell

Azure runbook to start/stop a vm says "Completed" but nothing happens


Ok I got it and the answer was frustratingly simple.

You cannot use a workflow block unless your runbook was created as a "PowerShell Workflow" runbook. In my case it was simply a "PowerShell" runbook which I guess was just ignoring the workflow block of code.

Recreating the runbook as a "PowerShell Workflow" runbook allowed the logging to be output so I could see what was happening and the VM got started as expected (although it took a really long time).