I'm trying to setup a Hyper-V backup job rentetion with powershell. As seen online it shouldn't be that complicated but I'm not getting it to work. The goal is to have a retention policy for 30 days (not restore points) and a GFS policy for 8 weeks, 12 months, 5 years. The script part looks like this:
$opts.BackupStorageOptions.RetentionType = "Days"
Set-VBRJobOptions -Job $job -Options $Opts
WARNING: Enable periodic fulls, or schedule a script to create them.
Job Name Type State Last Result Description
-------- ---- ----- ----------- -----------
vmware-ffi-cap-bb VMware Backup Stopped Success Created by DDOM-VEEAM-RB4\deeks at 8/29/2022 11:14...
The BackupStorageOptions property has the RetentionType value, and you can set it to Points or Days (you can use GetType().GetEnumNames() on any property with enums (names) like this and it will show you the possible values of the enum)
Add this in your script and test it, it should flip the jobs to Days then.
David Domask | Product Management: Principal Analyst