Azure Az.Storage command returns "A task was canceled."
Wallism
Posted on January 10, 2024
Using az.storage version 6.1.0 with this command:
$context = New-AzStorageContext -StorageAccountName accountname
(run after successfully connecting - Connect-AzAccount - and selecting the correct subscription - Set-AzAccount)
I kept getting this error:
New-AzStorageContext: A task was canceled.
Not the most helpful error message! Turns out the fix is very simple, we now need to provide the key as well (the previous version I was running did not require the key)
$context = New-AzStorageContext -StorageAccountName accountname -StorageAccountKey accountkey
Easy...made difficult by the useless error message.
💖 💪 🙅 🚩
Wallism
Posted on January 10, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.