I'm using Custom Script Extensions on Windows 2012 R2 VMs. These are out of the box 2012 R2 installs, so they are running PowerShell v4.
If the remote script fails (say for example, all the remote script has is a Write-Error statement), the CSE still returns as 'Provisioning succeeded'.
Is there a way around this to set the provisioning status to 'failed' if the remote script fails?
Thanks.