You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing New-AzureStorageContext -StorageAccountName <name> -StorageAccountKey <key>
If the user is unauthenticated, the cmdlet will throw an InvalidOperationException like the following:
New-AzureStorageContext : "There is no current context, please log in using Login-AzureRmAccount for Azure Resource Manager or Add-AzureAccount for Azure Service Management."
At line:1 char:9
+ New-AzureStorageContext -StorageAccountName <name> -Sto ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureStorageContext], InvalidOperationException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Storage.Common.Cmdlet.NewAzureStorageContext
You can work around this issue using one of these two methods:
Add -Endpoint ".core.windows.net" to the cmdlet invocation:
Description
When executing
New-AzureStorageContext -StorageAccountName <name> -StorageAccountKey <key>
If the user is unauthenticated, the cmdlet will throw an
InvalidOperationException
like the following:You can work around this issue using one of these two methods:
-Endpoint ".core.windows.net"
to the cmdlet invocation:Add-AzureRmAccount
orAdd-AzureAccount
The cmdlet should use the default storage endpoint when no endpoint is provided in offline scenarios. This will be fixed in an upcoming hotfix.
The text was updated successfully, but these errors were encountered: