Reputation: 162
Pretty new to Azure... and I have a task to upload a file to a blob using PowerShell.
All the information I got are :
I've already connected to my account and got the tenantID but an empty subscription (I thought that I'll have it by default, as the client should add me in there or something like that) which leads to not being able to list the all the storage accounts.
any hints, helps, leads ? or if someone have a better idea or already faced the same situation
Thank you all in advance
Upvotes: 0
Views: 1816
Reputation: 136146
Please try something like below:
$ctx = New-AzStorageContext -StorageAccountName "<account-name>" -SasToken "<sas-token>"
Set-AzStorageBlobContent -File "<full-file-path>" -Container "<container-name>" -Context $ctx
You can find more examples of uploading blobs using PowerShell here: https://learn.microsoft.com/en-us/powershell/module/az.storage/Set-AzStorageBlobContent?view=azps-2.8.0.
Upvotes: 1