PowerShell script exchange
Post Reply
vanberg
Novice
Posts: 4
Liked: never
Joined: May 12, 2010 9:02 pm
Full Name: eric
Contact:

Use Powershell

Post by vanberg »

How do I use the Set-VBRJobSchedule cmdlet?

I am trying this, but I get this error:

Code: Select all

set-vbrjobschedule (Get-VBRJob "test1") -retrytimes 3

Code: Select all

Set-VBRJobSchedule : Bad ParameterSet Name
At line:1 char:19
+ set-vbrjobschedule <<<<  (Get-VBRJob "test1") -retrytimes 3
    + CategoryInfo          : InvalidResult: (Veeam.Backup.DBManager.CDBJob:CD
   BJob) [Set-VBRJobSchedule], ArgumentException
    + FullyQualifiedErrorId : Backup,Veeam.Backup.PowerShell.Command.Job.SetJo
   bScheduleOptions
Any ideas? I cannot figure out what Bad ParameterSet Name means.

Thanks,

eric
Vitaliy S.
VP, Product Management
Posts: 27112
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Use Powershell

Post by Vitaliy S. »

Hello Eric,

Welcome to Veeam community!

Please have a look at the existing topic with the same question:

http://www.veeam.com/forums/viewtopic.p ... powershell

Hope it helps!
vanberg
Novice
Posts: 4
Liked: never
Joined: May 12, 2010 9:02 pm
Full Name: eric
Contact:

Re: Use Powershell

Post by vanberg »

Thanks Vitaliy,

I have looked at that post numerous times. While at the beginning of the post the do talk about Set-VBRJobSchedule, I do not see any examples of how to use it, or anything close to what my error is.

Error with set-vbrjobschedule (Get-VBRJob "test1") -retrytimes 3 :

Code: Select all

Set-VBRJobSchedule : Bad ParameterSet Name

They do have a little snipit in there, but since I am still new to powershell, I am unable to get it to work for me, with the options I want to set. I basically want each job to start on 15 minutes intervals, and run nightly. I have a text file of Job names, and start times. This will help minimize our network load during our other backup windows as well. Should be relatively straight forward according to the syntax in the help. But, just like the other poster, it is challenging to decipher what is really needed.

I have been able to create a bunch of jobs using powershell, I just need to schedule them all now.

Sample Syntax that I am trying:

Code: Select all

Set-VBRJobSchedule (Get-VBRJob "test1") -retrytimes 3 -StartDateTime "2010-05-13 22:00:51"
Failed to enable constraints. One or more rows contain values violating non-nul
l, unique, or foreign-key constraints.
At line:1 char:31
+ Set-VBRJobSchedule (Get-VBRJob <<<<  "test1") -retrytimes 3 -StartDateTime "2
010-05-13 22:00:51"
    + CategoryInfo          : NotSpecified: (:) [], ConstraintException
    + FullyQualifiedErrorId : System.Data.ConstraintException
Vitaliy S.
VP, Product Management
Posts: 27112
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Use Powershell

Post by Vitaliy S. »

Eric,

Let me check that with the Development team for you, please ping me tomorrow if you still don't get any reply from me by that time.

Thanks!
vanberg
Novice
Posts: 4
Liked: never
Joined: May 12, 2010 9:02 pm
Full Name: eric
Contact:

Re: Use Powershell

Post by vanberg »

Vitaliy,

Just pinging you back, per your reply.
Vitaliy S.
VP, Product Management
Posts: 27112
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Use Powershell

Post by Vitaliy S. »

Eric,

Unfortunately, our main PowerShell guy is on vacation right now, I will try to research it for you and as soon as I get any information I will update this thread.
vanberg
Novice
Posts: 4
Liked: never
Joined: May 12, 2010 9:02 pm
Full Name: eric
Contact:

Re: Use Powershell

Post by vanberg »

Vitaly,

Thanks, that would be great. I created quite a few jobs with powershell, and I really do not want to manually schedule each one.

Eric
Vitaliy S.
VP, Product Management
Posts: 27112
Liked: 2719 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Use Powershell

Post by Vitaliy S. »

Eric,

Regarding Set-VBRJobSchedule cmdlet... This cmdlet cannot be used to set a job schedule, it just only changes already defined parameters for your job. If you would like to set a schedule for your job you should follow the example from my first post.

Hope it helps!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 12 guests