PowerShell script exchange
Post Reply
Backup.Operator
Enthusiast
Posts: 65
Liked: 1 time
Joined: Oct 31, 2022 11:39 pm
Full Name: Backup Administrator
Contact:

How to get the name of the backup job ?

Post by Backup.Operator »

From this cmdlet,

I wonder how to get the backup job name?

Code: Select all

Get-VBRRestorePoint | Select-Object Name, DisplayName, NeedHealthcheckRepair, State, VmName, CreationTime, Type, FindParent
:arrow: :mrgreen:
oleg.feoktistov
Veeam Software
Posts: 1918
Liked: 636 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: How to get the name of the backup job ?

Post by oleg.feoktistov »

Hi,

The nearest object you could get job name from is a backup, so with v12 true per-vm it would look like this:

Code: Select all

$rps = Get-VBRRestorePoint 
foreach ($rp in $rps) {
$childBackup = $rp.FindBackup()
$parentBackup = Get-VBRBackup -Id $childBackup.ParentBackupId
$jobName = $parentBackup.JobName
$rp | Select-Object Name, DisplayName, NeedHealthcheckRepair, State, VmName, CreationTime, Type, @{n='JobName';e={$jobName}}
}
Best regards,
Oleg
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests