Hi brholmes and pkh,
Great question -- hope the following helps:
Background
DuplicateStageTasks have both a source (backup or duplicate stage) and schedule (time-based or immediately after).
For backup sources, you also have the choice of "All", "Most recent full", and "Specific Backups".
Problem
This is an issue with the parameter sets we shipped for the Set-BEDuplicateStageBackupTask cmdlet.
They are the same as the New-BEDuplicateStageBackupTask, but your example usage reveals a design error. Fortunately, there is a workaround.
Workaround
The source-related parameters must always be given because they're required parameters in the various parameter sets (i.e. multiple syntaxes) that Set-BEDuplicateStageBackupTask supports.
Examples
$Time = Get-Date -Day 1 -Month 11 -Hour 5 -Minute 00 -Second 00
$Schedule = New-BESchedule -MonthlyEvery First -Day Day -StartingAt $Time -Every 1
# If you're duplicating all backups in "Monthly Tape Backup":
Get-BEBackupDefinition -Name "JobName" | Set-BEDuplicateStageBackupTask -Name "Monthly Tape Backup" -Schedule $Schedule -SourceBackup AllBackups | Save-BEBackupDefinition
# If you're duplicating the most recent full in "Monthly Tape Backup":
Get-BEBackupDefinition -Name "JobName" | Set-BEDuplicateStageBackupTask -Name "Monthly Tape Backup" -Schedule $Schedule -SourceBackup MostRecentFullBackup | Save-BEBackupDefinition
# If you're duplicating a backup task called "Full" in "Monthly Tape Backup":
Get-BEBackupDefinition -Name "JobName" | Set-BEDuplicateStageBackupTask -Name "Monthly Tape Backup" -Schedule $Schedule -SourceBackup SpecificSourceBackups -SpecificSourceBackup Full | Save-BEBackupDefinition
Discussion
It's not ideal, because you need to re-set the -SourceBackup and (if necessary) -SpecificSourceBackup parameters to their current values (otherwise you'll change the inputs to your duplicate task!)
Hope this helps you get over the hump -- I'll see what I can do to get this changed/fixed in an upcoming release.
Question
One question for you: say you tried applying this change to "*" duplicate tasks in a backup definition, and one of them currently had an "ImmediatelyAfter" schedule. What would you expect the following line to do:
Get-BEBackupDefinition -name "JobName" | Set-BEDuplicateStageBackupTask -Name "*" -Schedule (New-BEBackupSchedule -Weekly -Every 1 -StartingAt 11pm) | Save-BEBackupDefinition -confirm:$false
a) Change the schedule to time-based, with a -SpecificSourceBackup of the task it previously duplicated "ImmediatelyAfter"
b) Write an error, and require that -Force is specified (because changing from immedately after to time-based schedule is a bit radical, so it would be good to draw attention to the change)
c) Write a warning, but otherwise the same as option "a" above
d) Something else?