Using Az in an Azure DevOps Powershell Task
Hello! Last month I posted how to run the Azure PowerShell Task on a Self-Hosted Build Agent but because using self-hosted agents is something I’m not that interested in anymore here is an alternative to use the Hosted Build Agents. There’s two steps to this: first you need to use the AzureCLI@2 task. This has an option to include the spn details, or in other words the login details of the Azure Resource Manager subscription you have specified in the azureSubscription parameter.