Problem is resolved after selecting script type as "PowerShell" in azure cli task instead of "shell"
Azure data factory stop all trigger azure cli for each loop
Pankaj Joshi
391
Reputation points
I am using this CLI command though devops azure cli task to stop all azure data factory trigger but I am receiving error of "(". bracket. Could you please review and let me know where could be the possible syntax error?
$names = az datafactory trigger list --factory-name "xxx" --resource-group "xxx" --query "[?properties.runtimeState=='Started'].name" -o tsv --only-show-errors
foreach($name in $names){
az datafactory trigger stop --factory-name "xxx" --resource-group "xxx" --name $name --only-show-errors
}