Forum Discussion
Yash_message
Feb 18, 2022Copper Contributor
what would be powersheel command for getting backup status of azure vm
I am running command to get the backup status of azure vms. in which I have to select option all the time like inprogress, completed, failure.
please help me the command which will show the status, whatever it is.
I am using the below command-
Get-AzRecoveryServicesBackupJob -Status InProgress -VaultId /subscriptions/f30d-46c7-8676-e34f9090bcc8/resourceGroups/abc/providers/Microsoft.RecoveryServices/vaults/vault803
and also there is possibility, that I can get the output for 2 days from current days.?
I guess something like this?
Get-AzRecoveryServicesBackupJob -VaultID /subscriptions/f30d-46c7-8676-e34f9090bcc8/resourceGroups/abc/providers/Microsoft.RecoveryServices/vaults/vault803 -Operation "Backup" -From ((Get-Date).AddDays(-2).ToUniversalTime()) | Select-Object WorkloadName,Operation,Status,StartTime,EndTime,Duration
(http://blog.petersenit.co.uk/2020/04/azure-recovery-service-vault-backup.html)
- Did this work for you?
- Yash_messageCopper ContributorYes, thank you so much for your help.
Yash_message good to hear, please mark my answer as solution to mark it as solved