Search code examples
powershellazurebackupazure-backup-vault

Get-AzureRmBackupVault not returning any error or result


Still wondering why Azure Powershell is not consistently working.

I tried pulling all azure vault via powershell using following command line but none of result coming from this command :

Add-azurermaccount

Login-AzureRmAccount

Select-AzureRmSubscription -SubscriptionId "XXXXX-b8ee-4533-a2c2-3ee6b4f01a8d"

Get-AzureRmBackupVault

Same problem with many other powershell command like Get-AzureRmResourceGroup where otherside Get-AzureRmVM working fine.


Solution

  • Please ensure you have a Backup vault (classic) in your subscription.

    enter image description here

    Backup Vault is a classic resource, if you create Recovery Services vault,

    enter image description here

    please execute following cmdlet.

    Get-AzureRmRecoveryServicesVault 
    

    More information about this please refer to this link.

    Note: You could not use Get-AzureRmBackupVault to get Recovery Sevices Vault . It seems that you don't have backup vault(classic) in your subscription.

    If you have Backup vault in your subscription, you could download and install the latest version Azure Power Shell from the link.