> ## Content Index
> Fetch the complete content index at: https://codeisahighway.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Migrate your classic storage account to Azure Resource Manager using PowerShell Azure v5.0.x
- URL: https://codeisahighway.com/migrate-your-classic-storage-account-to-azure-resource-manager-using-powershell-azure-v5-0-x/
- Published: 2018-01-21T00:00:00.000Z
- Updated: 2026-07-23T03:03:18.000Z
- Author: Stephane Lapointe
- Tags: Azure Resource Manager, Microsoft Azure, PowerShell, Storage, ASM, #Import 2023-07-11 16:44, #Import 2026-09-04 10:31, #Import 2026-09-04 13:56

I've been working to convert a lot of classic resources on Azure lately, a lot of fun I assure you! Many of the scenarios I faced implied virtual machines & virtual networks but here I will present a simple case I did recently, migration of a simple Classic storage used for blobs, tables & queues.

If you want to migrate one or many classic storage accounts that are used for everything else than hosting VHDs and images, this is the recipe for you.

What you'll need is Azure & AzureRM PowerShell modules installed, I used version 5.0.0 for this article, to install them you can type the following in a PowerShell (administrator) console:

```powershell
Install-Module -Name AzureRm -RequiredVersion 5.0
Install-Module -Name Azure -RequiredVersion 5.0

```

> Note: you need to make sure you don't have VM images and disks as Azure Resource Manager storage accounts don't support Classic images & disks.

First thing first, you'll need to login into your account and select the right subscription.

```powershell
Add-AzureAccount # enter your credentials
Select-AzureSubscription -SubscriptionId 00000000-0000-0000-0000-000000000000 # replace with yours

```

In order to use any migration cmdlets, you need to register the `Microsoft.ClassicInfrastructureMigrate` resource provider using this command (make sure you have the privileged permissions on the Azure subscription):

```powershell
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

```

![Register-AzureRmResourceProvider](https://codeisahighway.com/content/images/2018/01/Register-AzureRmResourceProvider.png)  
Wait a bit and you'll see that the registration is completed.

```powershell
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.ClassicInfrastructureMigrate

```

![Get-AzureRmResourceProvider](https://codeisahighway.com/content/images/2018/01/Get-AzureRmResourceProvider.png)

Now that you are in the right subscription and all the requirements are met, make sure you can get the desired storage account by fetching it:

```powershell
Get-AzureStorageAccount -StorageAccountName 'Your storage account name' # replace with yours

```

![Get-AzureStorageAccount](https://codeisahighway.com/content/images/2018/01/Get-AzureStorageAccount.png)

We are all good now, let's migrate this the Classic storage account to Azure Resource Manager in 3 little steps: first validate, then prepare the migration and finally, commit changes.

```powershell
Move-AzureStorageAccount -Validate -StorageAccountName 'Your storage account name' # replace with yours

Move-AzureStorageAccount -Prepare -StorageAccountName 'Your storage account name' # replace with yours

## IF at any point here you changed your mind, you can revert the migration using the following :
# Move-AzureStorageAccount -Abort -StorageAccountName 'Your storage account name' # replace with yours

Move-AzureStorageAccount -Commit -StorageAccountName 'Your storage account name' # replace with yours

```

![Move-AzureStorageAccount](https://codeisahighway.com/content/images/2018/01/Move-AzureStorageAccount.png)

You can confirm that your storage account is now under the resource provider Microsoft.Storage instead of Microsoft.ClassicStorage

```powershell
Add-AzureRmAccount # enter your credentials
Select-AzureRmSubscription -SubscriptionId 00000000-0000-0000-0000-000000000000 # replace with yours
Find-AzureRmResource -ResourceNameContains 'Your storage account name' # replace with yours

```

![Find-AzureRmResource](https://codeisahighway.com/content/images/2018/01/Find-AzureRmResource.png)

> You'll notice that your storage account is under a new resource group, the name of your storage account + '-Migrated'. The good news with ARM resources is that you can move them in a new or existing resource group without a problem, on the contrary of when it was a classic resource.

Have a good one!

## References

- [AzureRm PowerShell v5.0.0](https://www.powershellgallery.com/packages/AzureRm/5.0.0?ref=codeisahighway.com)
- [Azure PowerShell v5.0.0](https://www.powershellgallery.com/packages/Azure/5.0.0?ref=codeisahighway.com)
- [Platform-supported migration of IaaS resources from classic to Azure Resource Manager](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/migration-classic-resource-manager-overview?ref=codeisahighway.com)