Hi,
I am not very good at PS scripting and I am trying to run 2 scripts from this post http://forums.veeam.com/veeam-backup-re ... tml#p73343
When I run the first script, that is:
Add-PSSnapin VeeamPSSnapin
$JobOptions = Get-Vbrjob -name "Vi-test#31" | Get-VBRJobOptions
$JobOptions.BackupTargetOptions.TransformFullToSyntethic = $False
$JobOptions.BackupStorageOptions.EnableFullBackup = $False
$Job.SetOptions($JobOptions)
I get this error at line 5:
You cannot call a method on a null-valued expression.
At D:\Veeamscripts\syn_full_14\prepare.ps1:5 char:1
+ $Job.SetOptions($JobOptions)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Can anyone help me figure out why?
-
- Novice
- Posts: 9
- Liked: never
- Joined: Sep 24, 2012 1:05 pm
- Contact:
-
- Veeam Software
- Posts: 649
- Liked: 170 times
- Joined: Dec 10, 2012 8:44 am
- Full Name: Nikita Efes
- Contact:
Re: Error trying to set options in veeam
You have not defined $Job variable in your script.
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Error trying to set options in veeam
In order to make the script work, change the first lines a little bit:
Thanks.
Code: Select all
$Job = Get-Vbrjob -name "Vi-test#31"
$JobOptions = $Job | Get-VBRJobOptions
Who is online
Users browsing this forum: No registered users and 8 guests