PowerShell script exchange
Post Reply
ratkinsonuk
Expert
Posts: 102
Liked: 14 times
Joined: Dec 10, 2018 10:59 am
Full Name: Robert Atkinson
Contact:

Set-VBRGFSRetentionPolicy Missing 'Get'

Post by ratkinsonuk »

Am I right in thinking the Set-VBRGFSRetentionPolicy (
https://helpcenter.veeam.com/docs/backu ... ml?ver=110) needs a 'Get' version of the commandlet, or am I going about things the wrong way?

I'm currently doing this at the object level, but I'd much prefer to use an dedicated commandlet API to make it future-proof.

Code: Select all

        $BackupJobOptions.BackupStorageOptions.RetentionType = "Days"
        $BackupJobOptions.BackupStorageOptions.RetainDaysToKeep = 13
        $BackupJobOptions.GfsPolicy.IsEnabled = $True
            
        $BackupJobOptions.GfsPolicy.Weekly.IsEnabled = $True
        $BackupJobOptions.GfsPolicy.Weekly.KeepBackupsForNumberOfWeeks = 2

        Write-Host "Saving GFS/Retention settings"
        $Temp = Set-VBRJobOptions -Job $BackupJobName -Options $BackupJobOptions
Any thoughts?

Cheers, Rob.
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Set-VBRGFSRetentionPolicy Missing 'Get'

Post by Mildur »

Hi Rob

Yes, currently you have to use object properties if you want to see the current configuration.
For configuring a job sometimes you also have to use object properties. We don't have parameters for every single available job option. There are far too many of them.

Which Options would you like to see as a cmdlet parameter for a potential GET and SET command?

Best,
Fabian
Product Management Analyst @ Veeam Software
david.domask
Veeam Software
Posts: 1226
Liked: 322 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set-VBRGFSRetentionPolicy Missing 'Get'

Post by david.domask » 1 person likes this post

@ratkinsonuk, just a note, that cmdlet is just for backup copies from External Repositories (like Veeam Backup for AWS/Azure/GCP repositories added to Veeam server as an external repository); I'm not sure why it's like that, but that's likely why it's like that and you have to do it the other way for non-ExternalRepository based Backup Copies.
David Domask | Product Management: Principal Analyst
ratkinsonuk
Expert
Posts: 102
Liked: 14 times
Joined: Dec 10, 2018 10:59 am
Full Name: Robert Atkinson
Contact:

Re: Set-VBRGFSRetentionPolicy Missing 'Get'

Post by ratkinsonuk »

Mildur wrote: Dec 13, 2022 7:56 am Which Options would you like to see as a cmdlet parameter for a potential GET and SET command?
Morning Fabian, and thanks for responding.

Really, I think a cmdlet to match the GFS enhancements introduced to B&R primary backups in v11. It would also be good if they covered the GFS settings in copy jobs too, as both sets of options are now very similar.

I'll continue using the object-level settings for now though.

Cheers, Rob.
ratkinsonuk
Expert
Posts: 102
Liked: 14 times
Joined: Dec 10, 2018 10:59 am
Full Name: Robert Atkinson
Contact:

Re: Set-VBRGFSRetentionPolicy Missing 'Get'

Post by ratkinsonuk »

david.domask wrote: Dec 13, 2022 9:50 am @ratkinsonuk, just a note, that cmdlet is just for backup copies from External Repositories (like Veeam Backup for AWS/Azure/GCP repositories added to Veeam server as an external repository); I'm not sure why it's like that, but that's likely why it's like that and you have to do it the other way for non-ExternalRepository based Backup Copies.
Thanks for pointing that out David. I certainly hadn't spotted that, and made the assumption that is was for B&R primary backups given the cmdlet name. It also explains why it doesn't seem to match the B&R GUI settings.

Cheers, Rob.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests