Powershell to connect to azure

Handian Sudianto 6,186 Reputation points
2025-08-05T08:47:30.4033333+00:00

Can we make powershell script to query information from azure backup, at least the result must contain vm name and date last backup.

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 125.2K Reputation points MVP Volunteer Moderator
    2025-08-05T10:51:03.45+00:00

    Hi @Handian Sudianto ,

    if you are using Backup Recovery Vault for backup you can try this script:

    $arsv= Get-AzRecoveryServicesVault -ResourceGroupName "<name of the resource group>" -Name "<name of service recovery vault"
    $backupJobs = Get-AzRecoveryServicesBackupJob -VaultID $arsv.ID
    $backupJobs
    

    of you are using Azure Backup Vault please try this (i haven't tested this):

    Get-AzDataProtectionJob -ResourceGroupName "<name of the resource group>" -VaultName "<name of backup vault"
    

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards

    Andreas Baumgarten


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.