PowerShell script exchange
Post Reply
allan.warner
Influencer
Posts: 14
Liked: 7 times
Joined: Sep 17, 2021 7:03 am
Full Name: Allan Warner
Contact:

Set-VBRBackupCopyJob - Disabling Job

Post by allan.warner »

Hi,

I am having an issue when using the Set-VBRBackupCopyJob command... its setting the parameters.. but also its then disabling the job... is this expected?

Am I supposed to run Enable-VBRBackupCopyJob after?

Its annoying as I would like to run the Set command when the job is running, so that the changes can be picked up on the next run. At the moment it will kill the running job (as it sets it to disabled)..

Code: Select all

$VBRComputerGFSMonthlyoptions = New-VBRComputerGFSMonthlyOptions -RetentionPeriod 12 -SelectedWeek 'First';
$VBRComputerGFSYearlyoptions = New-VBRComputerGFSYearlyOptions -RetentionPeriod 7 -SelectedMonth 'June';
$VBRComputerGFSOptions = New-VBRComputerGFSOptions -GFSMonthlyOptions $VBRComputerGFSMonthlyoptions -GFSYearlyOptions $VBRComputerGFSYearlyoptions;

Set-VBRBackupCopyJob -Job $VBRBackupCopyJob -Description "Edited via Powershell script by $currentUser at $TimeStamp" -Mode Immediate -BackupJob $VBRJob -DirectOperation -GFSOptions $VBRComputerGFSOptions -RetentionType RestoreDays -RetentionNumber 30 -AnyTime;
david.domask
Veeam Software
Posts: 2163
Liked: 519 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Set-VBRBackupCopyJob - Disabling Job

Post by david.domask »

Hi Allan,

I tried to reproduce just now but was not able to with a simple test:

1. Run your same code against a Backup Copy Job (BCJ) without the -BackupJobs parameter while BCJ is running => No Disabling
2. Run your same code against a Backup Copy Job (BCJ) with the -BackupJobs parameter while BCJ is running => No Disabling

Is there more to your script or it's truly just the above code-block that does it? If it's just the code block, may I ask you to reproduce the issue and please open a Support Case for the issue? Be sure to note the date/time of the reproduce and include logs for Support to review. (Use the 3rd radio option to select from hosts, select the Veeam server itself to export from).

Please share the case number here once created. Thanks!
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests