0
votes

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.

1
You need to pass the name of the resource you are trying to get an error message.Marcelo
You should update your modules, Add-AzureRmAccount is no longer a thing.TheMadTechnician
execuse me, whats wrong with add-azurermaccount? its working on the latest version of Azure PowerShell @TheMadTechnician; to the OP, delete all the Azure PowerShell modules and install latest versions4c74356b41
To run the command Get-AzureRMBackupvault you need PowerShell module 1.7.0 Download the latest PowerShell module from the below link and retry the operation powershellgallery.com/packages/AzureRM.DataLakeStore/5.0.0Vikranth S

1 Answers

0
votes

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.