I have an issue at PowerShell script for executing on pipeline at dev azure,
error is happening with message:
Start-Process : This command cannot be run due to the error: %1 is not a valid Win32 application
it was worked some time ago but now it is not, is it some updates were done on azure? or I need to improve some code?
foreach ($alert in $alerts)
{
Write-Log "`tCreating alert $($alert.AlertName)"
$azArgs = "monitor metrics alert create --name ""$($alert.AlertName)"" --resource-group ""$($resourceGroup)"" --condition ""$($alert.AlertRule)"" --scopes ""$($alert.ResourceId)"" --window-size 5m --evaluation-frequency 1m --action ""$actionGroupResourceId"" --description "" "" --subscription ""$subscriptionId"" --auto-mitigate true"
Write-Verbose $azArgs
Start-Process "az" -ArgumentList $azArgs -NoNewWindow -Wait
}