Hello Jason McWhinnie,
Greetings! Welcome to Microsoft Q&A Platform.
I understand that you’re encountering issues with Azure PowerShell commands related to a storage account pending migration to SRP (Storage Resource Provider). The error messages indicate that there’s a problem with the migration process, which is preventing the deletion of the storage account and the resource group.
If you’re certain that you want to abort the migration process, you can use the Move-AzureStorageAccount cmdlet with the -Abort parameter. However, it’s important to note that the AzureRM module will be retired, and it’s recommended to use the Az module instead. Since you’re using PowerShell 7.4.2, you should use the Az module commands. To abort the migration, you might need to use the Move-AzStorageAccount cmdlet with the -Abort parameter. If this cmdlet is not recognized, ensure that you have the latest version of the Az module installed.
Once the migration has been aborted or completed, you can attempt to remove the storage account again using the Remove-AzStorageAccount cmdlet with the -Force parameter to bypass the confirmation prompt. If the storage account was the only resource within the resource group, you can then use the Remove-AzResourceGroup cmdlet to delete the resource group.
Make sure you’re working within the correct Azure subscription context and 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
Similar SO thread for reference - https://stackoverflow.com/questions/72360137/getting-accountpendingmigrationtosrp-the-specified-account-is-pending-migration, https://learn.microsoft.com/en-us/answers/questions/1499834/azure-storage-account-pending-migration-prevents-d
Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.