I'm trying to import VHD via PowerShell in a Virtual Machine but am getting errors.
Add-AzureRmVhd : Resource group 'ResourceGroupName' could not be found.
At line:1 char:1
+ Add-AzureRmVhd -ResourceGroupName ResourceGroupName -destination
"https ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Add-AzureRmVhd], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.StorageServices.AddAzureVhdCommand
These are the steps I am following:
- Install-Module AzureRM -AllowClobber
- Connect-AzureRmAccount
Add-AzureRmVhd -ResourceGroupName VMWinServerFtH -destination "https://vhdexternal.blob.core.windows.net/oldvhd/test.vhd" -LocalFilePath "C:\Users\administrador\Desktop\disk.vhd"
I've already verified the correct spelling of the resource group name.

I have download VHD file from disk. To import VHD via PowerShell in a Virtual Machine check the below workaround.
Now to import VHD file from local file to storage account you can make use of below commands:
The Add-AzVhd command uploads an on-premises virtual hard disk to a managed disk or a blob storage account.
To confirm in portal: