Reputation: 9798
I want to automate the transferring of files into my Azure Storage. I'm using the following script.
az storage account keys list -g ****V2 -n *****estx
az storage blob upload-batch --source $(System.DefaultWorkingDirectory)/_ClientWeb-Build-CI/ShellArtifact/out/build --destination `$web --account-key *****agnqUDzwNe/gOIAzsQ== --account-name *****estx
This works, but I don't want to add the --acount-key
. When I try to retrieve the account key by using az storage account keys list
I get:
Please run 'az login' to setup account.
I'm using a Azure PowerShell (Preview) task version 4.
How can I substitute my current account key with something generated?
Upvotes: 1
Views: 602
Reputation: 29482
Running Azure Powershell Task will authenticate using Connect-AzAccount
You should use Azure Cli Task. It will authenticate using az login
.
Upvotes: 1