Powershell cmd to get the azure backup status on Vm basis

GVS 146 Reputation points
2020-08-26T01:10:46.597+00:00

Hi, Someone please help me to know Powershell cmd to get the azure backup status on Vm basis

Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,135 questions
{count} votes

2 answers

Sort by: Most helpful
  1. SadiqhAhmed-MSFT 38,561 Reputation points Microsoft Employee
    2020-08-26T07:34:08.37+00:00

    AzureisMyCareer-5423 Thanks for reaching out to us!
    The Get-AzRecoveryServicesBackupJob cmdlet gets Azure Backup jobs for a specific vault. If you are looking to get these details only for VMs, see 'Example 4'might be helpful.

    Get-AzRecoveryServicesBackupStatus - This command is for status to check whether a VM is backed up or not. Reference link - https://learn.microsoft.com/en-us/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupstatus?view=azps-4.6.0

    Let us know if that helps or need further assistance in this matter.

    ------------------------------------------------------------------------------------------------------------------------------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.

    1 person found this answer helpful.

  2. SadiqhAhmed-MSFT 38,561 Reputation points Microsoft Employee
    2022-05-24T09:50:08.487+00:00

    @Rajendar Chakinala While we don't have a readymade sample PS script to achieve this, you can put together your own script with the help of below links:

    Query VMs not configured for backup by running an ARG query in PS: Sample query https://learn.microsoft.com/en-us/azure/backup/query-backups-using-azure-resource-graph#list-all-azure-vms-that-have-not-been-configured-for-backup

    Configure backup for VMs using Azure Backup PowerShell cmdlets: https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-automation

    Note - If you are interested in using Azure Policy to meet the same requirement, we have built-in Azure Policies available for those: https://learn.microsoft.com/en-us/azure/backup/backup-azure-auto-enable-backup

    Hope this helps!

    ----------------------------------------------------------------------------------------------------------------------

    Please take a moment to "Accept Answer" and Up-Vote the post that helped answer your question.

    0 comments No comments