0

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.

Jason Ye
  • 13,710
  • 2
  • 16
  • 25
vj54
  • 39
  • 8
  • You need to pass the name of the resource you are trying to get an error message. – Marcelo Nov 17 '17 at 17:57
  • You should update your modules, `Add-AzureRmAccount` is no longer a thing. – TheMadTechnician Nov 17 '17 at 18:42
  • 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 versions – 4c74356b41 Nov 18 '17 at 11:39
  • 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 https://www.powershellgallery.com/packages/AzureRM.DataLakeStore/5.0.0 – Vikranth S Nov 19 '17 at 16:40

1 Answers1

0

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.

Community
  • 1
  • 1
Shui shengbao
  • 18,746
  • 3
  • 27
  • 45
  • Hi, if you use the latest version Azure Power Shell, I am sure my answer will work for you. If possible, you could check it. – Shui shengbao Nov 21 '17 at 10:13
  • Version update did a trick but I did require me to logout and religion at machine for some reason. – vj54 Nov 24 '17 at 14:14
  • @vj54 Do you check it on Azure Portal, the resource you want to get is `Backup vault(classic)` or `Recovery Services vault`? If possible, could you give me some screenshots about this? – Shui shengbao Nov 27 '17 at 05:48