PowerShell script exchange
Post Reply
sidavid
Enthusiast
Posts: 63
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

Veeam 7 Powershell Change Restore Point to Keep

Post by sidavid »

Hi,

I want to change the number of restore points to keep in BackupCopy Jobs in powershell.

Get-VBRJob -Name $BackupCopyJobName | Set-VBRJobAdvancedOptions

I need the options to add that correspond to the Restore Point Policy.

Many thanks

DS
tsightler
VP, Product Management
Posts: 6011
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Veeam 7 Powershell Change Restore Point to Keep

Post by tsightler »

I'd probably do it like this:

Code: Select all

$job = Get-VBRJob -Name "<Job_Name>"
$job.Options.GenerationPolicy.SimpleRetentionRestorePoints = 14
$job.SetOptions($job.Options)
All of the Backup Copy job options are in the GenerationPolicy object and these properties can be manipulated there.
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Veeam 7 Powershell Change Restore Point to Keep

Post by veremin »

I’ve previously created a couple of snapshots that might help you to understand beter what PS command is responsible for this or that BCJ schedule setting. Thanks.
sidavid
Enthusiast
Posts: 63
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

Re: Veeam 7 Powershell Change Restore Point to Keep

Post by sidavid »

Many thanks guys !!!
With your help I'm able to finish my script
Post Reply

Who is online

Users browsing this forum: aQuestionmark and 11 guests