Remove-AzStorageAccount : AccountPendingMigrationToSrp The specified account is pending migration to SRP.

Zach 21 Reputation points
2022-02-23T18:20:16.73+00:00

I'm trying to delete an empty storage account in Azure. I'm getting the following error.

Remove-AzStorageAccount : AccountPendingMigrationToSrp The specified account is pending migration to SRP.

There is nothing in this storage account. I've tried deleting it though https://portal.azure.com, and I've tried deleting it through Powershell.

How can I delete it?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,088 questions
0 comments No comments
{count} votes

Accepted answer
  1. SaiKishor-MSFT 17,231 Reputation points
    2022-02-23T21:23:40.237+00:00

    @Zach Thank you for reaching out to Microsoft Q&A. I understand that you are trying to remove your storage account but are unable to do so as it is throwing an error that the migration is pending. Please run in the below cmdlets in PowerShell:

      Cancel Migration :     Move-AzureStorageAccount -Abort -StorageAccountName "Saname"      
     Remove Storage Account:     Remove-AzureStorageAccount -ResourceGroupName "RG01" -AccountName "mystorageaccount" -Force  -debug -verbose  
    

    Please let us know if that helps or if you have any further questions and we will be glad to assist you further. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Zach 21 Reputation points
    2022-02-25T12:51:09.94+00:00

    @SaiKishor-MSFT I found that same answer in this other post: https://learn.microsoft.com/en-us/answers/questions/412037/accountpendingmigrationtosrp.html.
    I have tried your method, but it produces the following error.

    Move-AzureStorageAccount : The term 'Move-AzureStorageAccount' is not recognized as the name of a cmdlet,  
    

    It appears the command is not recognized.

    PS C:\Windows\system32> Get-Command -Verb Move -Module Az.Storage  
      
    CommandType     Name                                               Version    Source  
    -----------     ----                                               -------    ------  
    Cmdlet          Move-AzDataLakeGen2Item                            4.2.0      Az.Storage  
    

    What else do I need to try?

    0 comments No comments

  2. Zach 21 Reputation points
    2022-02-25T14:01:19.697+00:00

    It appears I did not have all of the modules installed in Powershell. After re-installing the Az module, I was able to follow the commands and resolve the issue.

    0 comments No comments

  3. James Keeley 21 Reputation points
    2022-09-14T19:26:58.33+00:00

    I'm having the exact same issue and have tried everything listed in this post to no avail. Not sure what I'm missing in PowerShell but I keep getting the "Move-AzureStorageAccount is not a recognized name" error...

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.