So, correct me if I’m wrong, but you’re trying to go through job stored in .csv-file and enable Full Backup for all of them. And the problem is that for some of them it works smoothly and for some it fails with “no setting available” error, right?
If so, I’d say that this issue might be related to these lines:
- Code: Select all
$JobName = $i.VM
$job = Get-VBRJob -Name $JobName
Are you 100% sure that .VM parameter always coincides with the corresponding name of your job?
My assumption is that in some cases .VM parameter may differ from the real job name. In other words, there is no job with such name, so, sometimes $job variable is specified as “0” value, and as a result you see errors regarding methods that cannot be found on this object. (like in your previous script)
Consequently, if I were you, I’d definitely start my investigation with it.
Hope this helps.