none
Storage account not found by powershell

    Question

  • Hello,

    It might be an easy question for this audience: I created a storage account using the new portal, uploaded 120GB of data using Cloudberry and everything was fine.

    I can browse the data using the portal without any problem. 

    When I list my subscription via powershell the 'CurrentStorageAccountName' is empty. If I try to list the storage accounts using Get-AzureStorageAccount it just gets me a warning message "WARNING: GeoReplicationEnabled property will be deprecated in a future release of Azure PowerShell. The value will be merged into the AccountType property."

    Any idea why I am unable to manage the storage account via powershell?

    Thank you


    Tuesday, January 5, 2016 8:15 PM

Answers

  • The answer is here:

    http://stackoverflow.com/questions/32619221/difference-between-new-and-classic-storage-accounts-in-azure

    "Classic storage accounts are created using existing Service Management API's (the REST API stack that's been available for the past several years). The newer storage accounts are created with the new Azure Resource Manager (ARM) API's (which are also wrapped in PowerShell and CLI now)."

    • Marked as answer by Diego P Castro Wednesday, January 6, 2016 12:36 PM
    Wednesday, January 6, 2016 12:01 PM

All replies

  • Hello,

    You will need to use Set-AzureSubscription to set the current storage account as at https://msdn.microsoft.com/en-us/library/dn495189.aspx .

    For example:

    Set-AzureSubscription –SubscriptionName "MySub" -CurrentStorageAccount mystorage1

    Hope that helps,

    Marcus
    Tuesday, January 5, 2016 9:09 PM
    Moderator
  • Marcus,

    I am unable to set the storage account, once powershell does not find it. But it is active in the new portal.

    Wednesday, January 6, 2016 11:39 AM
  • Marcus,

    Quick question: I see two storage account options in the portal and one lists (classic). Looks like my storage account is not the classic one. Is powershell able to manage storage accounts in the "new format" ? 

    In the portal if I click classic storage accounts I don´t see any and seems to me powershell is just searching for the classic ones.

    Regards

    Wednesday, January 6, 2016 11:56 AM
  • The answer is here:

    http://stackoverflow.com/questions/32619221/difference-between-new-and-classic-storage-accounts-in-azure

    "Classic storage accounts are created using existing Service Management API's (the REST API stack that's been available for the past several years). The newer storage accounts are created with the new Azure Resource Manager (ARM) API's (which are also wrapped in PowerShell and CLI now)."

    • Marked as answer by Diego P Castro Wednesday, January 6, 2016 12:36 PM
    Wednesday, January 6, 2016 12:01 PM