Use Powershell

PowerShell script exchange

Use Powershell

Veeam Logoby vanberg » Tue May 18, 2010 11:04 pm

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
vanberg
Novice
 
Posts: 4
Liked: never
Joined: Wed May 12, 2010 9:02 pm
Full Name: eric

Re: Use Powershell

Veeam Logoby Vitaliy S. » Wed May 19, 2010 7:49 am

Hello Eric,

Welcome to Veeam community!

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

http://www.veeam.com/forums/viewtopic.php?f=2&t=3459&start=0&hilit=powershell

Hope it helps!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Use Powershell

Veeam Logoby vanberg » Wed May 19, 2010 1:43 pm

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
vanberg
Novice
 
Posts: 4
Liked: never
Joined: Wed May 12, 2010 9:02 pm
Full Name: eric

Re: Use Powershell

Veeam Logoby Vitaliy S. » Wed May 19, 2010 2:25 pm

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!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Use Powershell

Veeam Logoby vanberg » Thu May 20, 2010 4:10 pm

Vitaliy,

Just pinging you back, per your reply.
vanberg
Novice
 
Posts: 4
Liked: never
Joined: Wed May 12, 2010 9:02 pm
Full Name: eric

Re: Use Powershell

Veeam Logoby Vitaliy S. » Thu May 20, 2010 4:26 pm

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.
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Use Powershell

Veeam Logoby vanberg » Thu May 20, 2010 4:41 pm

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
vanberg
Novice
 
Posts: 4
Liked: never
Joined: Wed May 12, 2010 9:02 pm
Full Name: eric

Re: Use Powershell

Veeam Logoby Vitaliy S. » Wed May 26, 2010 10:55 am

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!
Vitaliy S.
Veeam Software
 
Posts: 19558
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests