I'm trying to enable GFS for all our backup jobs, but even with the help of Veeam support I can't get it working.
This is what the suggestion is from support:
The Set-VBRGFSRetentionPolicy always complains: Cannot convert the "Veeam.Backup.PowerShell.Infos.
VBRSimpleRetentionPolicy" value of type "Veeam.Backup.PowerShell.Infos.VBRSimpleRetentionPolicy" to type "Veeam.Backup.
PowerShell.Infos.VBRGFSRetentionPolicy".
I have been digging around in the help pages, but I can't get it working.
Any advise on how to configure GFS for all jobs with PowerShell?
The script you got doesn't work as Set-VBRGFSRetentionPolicy and Get-VBRRetentionPolicy cmdlets are applicable only for backup copy jobs with backups on external repositories (azure or aws) and agent backup copy jobs. You can find all the info on these types and acceptable parameters here.
For regular backup jobs it's a whole other story. As far as I understood, you need to setup the same retention policies for all regular backup jobs. Here is the script:
JobOptions cmldets operate over properties, which are not described in our documentation, but you still can discover property trees for objects with preinstalled Get-Member or Show-Object from PowershellCookBook module in such way:
Thanks Toni. I'm really glad to know I could help.
Just a side note - if you want to change only precise settings for each job, make sure options amendments stay inside foreach loop.
Otherwise, you are running a risk of assigning all options of one job to all jobs.
Cheers,
Oleg