Trying to save an output of azure advisor recommendation on to a variable so that i can pass on to next task.
However no matter what syntax I try, and believe me i have tried all possible combinations, the variable doesn't get saved. Interestingly, these work in cloud shell (bash) for E.g.
rgName="$(az group list --query "[?tags.Test=='yes'].name" --output tsv)"
az group show -n $rgName
This works just fine in cloud shell. But not in DevOps azurecli task. I also referred to multiple examples given in stack overflow itself, but none of them work. Using task version 1.*
rgName' is not recognised as an internal or external command,
Can someone give an working example for DevOps Task?
Note: BTW the whole reason for me using cli is because cant find Advisor RM module and the Az module wont load correctly in task version 4.*