08-04-2017 12:27 PM
Hi,
I'd like to write a script to pull the DiskStorageKeepForHours attribute for all of my backup jobs that write to disk. So far, the best I've been able to accomplish is to export the job definitions via the following code:
$jobs = Get-BEBackupDefinition
foreach ($job in $jobs)
{
$defname = $job.name
$job | Export-BEBackupDefinition > c:\src\jobdefs\$($defname).ps1
}
Then, I have to trawl the script to find the attributes I'm interested in.
I see from the documentation that I can, for example, Add-BEDifferentialBackupTask or Set-BEDifferentialBackupTask, but I don't see any way to Get-BEDifferentialTask, which is where I'd expect to find the DiskStorageKeepForHours for the differential portion of my backup.
Thank you.
Regards,
Rich
12-27-2017 07:05 AM
I will research the bemcli way but what if you explore the sql way and check dataretentionhours, job name column of vwjobpropertiesbackup table in sql. does that help ?