0

I want to use Get-AzureStorageBlob in a powershell script so my client can download files from my Azure Blob storage ( I use Devops to put them there )

The keys are in the script so the client does not need an Azure account.

He does however need to install Azure Powershell

And the instructions ask him to log in to Azure.

Is there an alternative?

Anass Kartit
  • 2,017
  • 15
  • 22
Kirsten
  • 15,730
  • 41
  • 179
  • 318

1 Answers1

1

If you just operates with azure storage, then you can ignore the "Connect-AzAccount" cmdlet.

After installing azure powershell module, since you have account_name and account_key of storage account, directly use them to download the blob.

But if you want to operate other resources like vm etc.,then you need to the cmdlet "Connect-AzAccount".

When I click Show Details in the right Commands panel I get an error message

cannot be loaded because running scripts is disabled on this system.
Kirsten
  • 15,730
  • 41
  • 179
  • 318
Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60
  • However Get-AzuureStorageBlob is not recognised as the name of a cmdlet – Kirsten Feb 15 '19 at 05:21
  • I see that in your mentioned doc, you installed use this line of code "Install-Module -Name Az -AllowClobber"? right? – Ivan Glasenberg Feb 15 '19 at 05:23
  • yes thats right, running Powershell 5.1 as administrator. – Kirsten Feb 15 '19 at 05:26
  • 1
    What you installed is actually the new azure powershell module, you should use the new cmdlet which built in the Az Module. In your case, you should use [Get-AzStorageBlobContent](https://learn.microsoft.com/en-us/powershell/module/az.storage/get-azstorageblobcontent?view=azps-1.3.0) instead. – Ivan Glasenberg Feb 15 '19 at 05:31
  • https://stackoverflow.com/questions/54703271/get-command-the-term-get-azstorageblobcontent-is-not-recognized-as-the-name – Kirsten Feb 15 '19 at 05:42