最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Getting Azure Backup Information through Powershell - Stack Overflow

programmeradmin4浏览0评论

I am trying to retrieve information about the status of backups from all of my Azure Backup Vaults (date of last backup, successful/unsuccessful), but when I try to use the command:

Get-AzRecoveryServicesBackupStatus

And I enter in the Name, Resource Group Name, and Type, I get an error for when I enter in the type and I'm not sure why.

This is what I get when I enter in the "Type":

When I enter "AzureVM" or "AzureFiles" for the "Type" instead, I get this error message:

Get-AzRecoveryServicesBackupStatus: The specified resource does not exist

For context, I found the information for Name/ResourceGroupName/Type through the command:

Get-AzRecoveryServicesBackupVault

Can anyone help me resolve this issue?

I am trying to retrieve information about the status of backups from all of my Azure Backup Vaults (date of last backup, successful/unsuccessful), but when I try to use the command:

Get-AzRecoveryServicesBackupStatus

And I enter in the Name, Resource Group Name, and Type, I get an error for when I enter in the type and I'm not sure why.

This is what I get when I enter in the "Type":

When I enter "AzureVM" or "AzureFiles" for the "Type" instead, I get this error message:

Get-AzRecoveryServicesBackupStatus: The specified resource does not exist

For context, I found the information for Name/ResourceGroupName/Type through the command:

Get-AzRecoveryServicesBackupVault

Can anyone help me resolve this issue?

Share Improve this question edited Mar 20 at 15:55 mimi m asked Mar 20 at 14:42 mimi mmimi m 311 silver badge5 bronze badges 2
  • Perhaps the cmdlet is just bad (these are autogenerated cmdlets and they're usually bad), have a look at the REST API: learn.microsoft/en-us/rest/api/backup/backup-status/… – Santiago Squarzon Commented Mar 20 at 16:14
  • Thank you for the resource, @SantiagoSquarzon , however, the command I used from the link you provided: POST https://management.azure/Subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupStatus?api-version=2024-10-01 is throwing errors when i plug in the relevant information (location, subscriptionID, api version), telling me that: The term 'POST' is not recognized as a name of a cmdlet, function, script file, or executable program. – mimi m Commented Mar 20 at 17:37
Add a comment  | 

1 Answer 1

Reset to default 0

After doing some more research, I found that it would be smarter to use

 Get-AzRecoveryServicesBackupJob

By:

  1. Initializing a variable to equal a single vault:

    $var = Get-AzRecoveryServicesVault -ResourceGroupName "\<your resource group name\>" -Name "\<your vault name\>"
    
  2. And then calling Get-AzRecoveryServicesBackupJob with the corresponding Vault Id

    $list = Get-AzRecoveryServicesBackupJob -VaultID $var.ID
    
  3. To display, you'd just call the array

        $list 
    

    and it would show you all of the completed, failed, and in progress backups

发布评论

评论列表(0)

  1. 暂无评论