Any idea what I'm missing?
Code: Select all
ForEach($BackupCopyJob in (Get-VBRJob | ? {$_.JobType -eq "Replica"} | Sort-Object Name)){
$Options = $BackupCopyJob.GetOptions()
$Properties = New-Object Psobject
$Properties | Add-Member -type Noteproperty -name "Job Name" -value $BackupCopyJob.Name
$Properties | Add-Member -type Noteproperty -name Description -value $BackupCopyJob.NameWithDescription
$Properties | Add-Member -type Noteproperty -name Scheduled -value $BackupCopyJob.IsScheduleEnabled
$Properties | Add-Member -type Noteproperty -name "Restore Points" -value $Options.generationpolicy.SimpleRetentionRestorePoints
$Properties | Add-Member -type Noteproperty -name "Retention Policy" -value $Options.generationpolicy.RetentionPolicyType
[color=#FF0000] $Properties | Add-Member -type Noteproperty -name Path -value $BackupCopyJob.GetTargetRepository().Name[/color]
Write-Output $Properties
}