PowerShell script exchange
Post Reply
jcolonfzenpr
Enthusiast
Posts: 51
Liked: 33 times
Joined: Dec 30, 2021 1:16 am
Full Name: Jonathan Colon
Location: Puerto Rico
Contact:

Storage-level corruption guard weekly schedule from PWSH

Post by jcolonfzenpr »

Hello,

Is there any way to retrieve the weekly Storage-level corruption guard schedule from powershell?

Image

Currently I can get the monthly schedule from '$Bkjob.Options.GenerationPolicy.CheckBackupMonthlyScheduleOptions' but there seems to be no option to get the weekly part.

Code: Select all

PS AsBuiltReport.Veeam.VBR> $Bkjob.Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions

DayOfWeek DayNumberInMonth DayOfMonth Months
--------- ---------------- ---------- ------
   Friday             Last 1          {January, February, March, April...}


PS AsBuiltReport.Veeam.VBR>

Code: Select all

PS AsBuiltReport.Veeam.VBR> $Bkjob.Options.GenerationPolicy


EnableDeletedVmDataRetention            : False
DeletedVmsDataRetentionPeriodDays       : 30
IsBackupCopySimpleMode                  : False
RecoveryPointObjectiveValue             : 1
RecoveryPointObjectiveUnit              : Day
SyncIntervalStartTime                   : 00:00:00
DeletionGuardDays                       : 0
UseDeletionGuardDays                    : False
RetentionPolicyType                     : Simple
KeepGfsBackup                           : False
SimpleRetentionRestorePoints            : 7
EnableCompactFull                       : False
EnableCompactFullLastTime               :
CompactFullBackupScheduleKind           : Monthly
CompactFullBackupDays                   : {Saturday}
CompactFullBackupMonthlyScheduleOptions : Veeam.Backup.Model.CDomFullBackupMonthlyScheduleOptions
EnableRechek                            : True
EnableSimpleObjectStorageRecheck        : False
RecheckScheduleKind                     : Daily
RecheckDays                             : {Friday}
RecheckBackupMonthlyScheduleOptions     : Veeam.Backup.Model.CDomFullBackupMonthlyScheduleOptions
RecheckTime                             : 05:00:00
GFSRecentPoints                         : 7
GFSWeeklyBackups                        : 4
GFSWeeklyBackupsEnabled                 : False
GFSMonthlyBackups                       : 0
GFSMonthlyBackupsEnabled                : False
GFSQuarterlyBackups                     : 0
GFSQuarterlyBackupsEnabled              : False
GFSYearlyBackups                        : 0
GFSYearlyBackupsEnabled                 : False
GFSIsReadEntireRestorePoint             : False
WeeklyBackupDayOfWeek                   : Sunday
MonthlyBackup                           : Veeam.Backup.Model.CDomMonthlyBackupCreationTime
QuarterlyBackup                         : Veeam.Backup.Model.CDomQuarterlyBackupCreationTime
YearlyBackup                            : Veeam.Backup.Model.CDomYearlyBackupCreationTime
ActualRetentionRestorePoints            : 7
DailyBackupTime                         : 22:00:00

PS AsBuiltReport.Veeam.VBR>
Best,
Jonathan Colon
https://techmyth.blog/
david.domask
Veeam Software
Posts: 2578
Liked: 605 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Storage-level corruption guard weekly schedule from PWSH

Post by david.domask » 1 person likes this post

Hi Jonathan,

Quick hint, you can get the same data in a more graceful form by passing a CJob object from Get-VBRJob to Get-VBRJobOptions:

$job = Get-VBRJob -Name 'some job"
$jOpts = Get-VBRJobOptions -Job $job

The items you're looking for are indeed in the GenerationPolicy property, but it looks a bit different. In your output, you're looking for:

RecheckScheduleKind : Daily
RecheckDays : {Friday}

Check ReCheckScheduleKind to tell if it's weekly or monthly, and based on that you can have your script parse out the correct information.
David Domask | Product Management: Principal Analyst
jcolonfzenpr
Enthusiast
Posts: 51
Liked: 33 times
Joined: Dec 30, 2021 1:16 am
Full Name: Jonathan Colon
Location: Puerto Rico
Contact:

Re: Storage-level corruption guard weekly schedule from PWSH

Post by jcolonfzenpr » 1 person likes this post

Works really well!

Thanks.
Jonathan Colon
https://techmyth.blog/
Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests