powershell cmdlets

PowerShell script exchange

Re: powershell cmdlets

Veeam Logoby fgw » Fri Apr 09, 2010 10:47 am

vitaliy, already tried this before here are results:

creating a new job with the following command returns this error

Add-VBRBackupJob Job1 VDDK san "My Computer" "H:\" Job1name -Objects "Test7"
Add-VBRBackupJob : Web Service credentials are not set for the host "VCserver"
At line:1 char:17
+ Add-VBRBackupJob <<<< Job1 VDDK san "My Computer" "H:\" Job1name -Objects "Test7"


the job is created, BUT has no vm associated with it. no matter if i use Test7 or "Test7".

the interesting part follows:

if i go ahead and add a vm e.g. Test7 to this job in the gui, and run the following command to remove Test7 and add VEXRHL instead, i receive the same errormessage

Set-VBRBackupJob "Job1" -object VEXRHL
Set-VBRBackupJob : Web Service credentials are not set for the host "VCserver"
At line:1 char:17
+ Set-VBRBackupJob <<<< "Job1" -object VEXRHL


this results in the original vm Test7 removed from the job BUT the vm named VEXRHL does not get added to the job, leaving an empty job!

may be the cmdlets which are run on the backup server needs to communicate with VCserver in order to validate if the vm to be added exists and this communication fails for any reason. all this is done with an administrator account which should have sufficient privs.
is there a certain port which needs to be opened for this communication?

any idea what the errormessage Web Service credentials are not set for the host "VCserver" is telling us?
fgw
Enthusiast
 
Posts: 65
Liked: 2 times
Joined: Thu Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer

Re: powershell cmdlets

Veeam Logoby Gostev » Mon Apr 12, 2010 3:55 pm

Franz, can you please send all logs from Help | Support information to support@veeam.com, as we could not reproduce the web service credentials issue easily and would like to inverstigate your specific situation more closely.
Gostev
Veeam Software
 
Posts: 21396
Liked: 2350 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: powershell cmdlets

Veeam Logoby Achim.Z. » Mon Aug 09, 2010 12:12 pm

Hi there;

i got a quastion about that part of the code:

Code: Select all
$s = $job.GetScheduleOptions()
$s.OptionsDaily.Enabled = $true
$s.OptionsDaily.Time = "12:58:53"
$job.SetScheduleOptions($s)


The job should be set to run on that time once a day.
In my case it is set to run periodically every hour.
Did i do a mistake?

regards
Achim.Z.
Achim.Z.
Novice
 
Posts: 9
Liked: never
Joined: Mon Aug 09, 2010 6:42 am

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Mon Aug 09, 2010 4:18 pm

Achim,

Let me check this with our PowerShell guru for you, I will post a reply as soon as I get any information from him.
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Tue Aug 10, 2010 12:51 pm

Achim, here is the example of running backup/replication job every hour:

Code: Select all
$job = get-vbrjob "JobName"

$sch = $job.getScheduleOptions()
$sch.OptionsPeriodically.Enabled = $true
$sch.OptionsPeriodically.FullPeriod = 60
$job.SetScheduleOptions($sch)

$opt = $job.GetOptions()
$opt.RunManually = $false
$job.SetOptions($opt)

$job.Save()

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

Re: powershell cmdlets

Veeam Logoby Achim.Z. » Wed Aug 11, 2010 1:21 pm

Hi;

sorry, that the answer took a little;
yes and no: yes, the job can be added, no it is not really what i needed :-(
I need to add the OptionsDaily for a Backup ata special time, eg 22:23h

the point is, if i use:
Code: Select all
$sch = $job.getScheduleOptions()
$sch.OptionsDaily.Enabled = $true
$sch.OptionsDaily.Time = "12:58"
$job.SetScheduleOptions($sch)


the time is set now, but active is still "Periodically every" and not "run at"

Regards
Achim
Achim.Z.
Novice
 
Posts: 9
Liked: never
Joined: Mon Aug 09, 2010 6:42 am

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Wed Aug 11, 2010 2:45 pm

Achim,

Please try to use the example below, it should be exactly what you're looking for:
Code: Select all
$job.SetOptions($opt)
$sch = $job.getScheduleOptions()
$sch.OptionsDaily.Enabled = $true
$sch.OptionsDaily.Enabled
$sch.OptionsPeriodically.Enabled = $false
$sch.OptionsDaily.Time = "14:00:00"
$job.SetScheduleOptions($sch)
$job.Save()

Thank you!
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: powershell cmdlets

Veeam Logoby Achim.Z. » Wed Aug 11, 2010 3:28 pm

Hey, that's funny;

I lost all the jobs, trying to modify with that ... *hahaha*
Code: Select all
$job = get-vbrjob "ServerName"
$job.SetOptions($opt)
$sch = $job.getScheduleOptions()
$sch.OptionsDaily.Enabled = $true
$sch.OptionsDaily.Enabled
$sch.OptionsPeriodically.Enabled = $false
$sch.OptionsDaily.Time = "14:00:00"
$job.SetScheduleOptions($sch)
$job.Save()


regards
Achim
Achim.Z.
Novice
 
Posts: 9
Liked: never
Joined: Mon Aug 09, 2010 6:42 am

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Wed Aug 11, 2010 3:52 pm

Sorry to hear that, I've just posted an example from the lab of mine, if you are able to reproduce this issue, please contact our technical support team for assistance directly.
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: powershell cmdlets

Veeam Logoby Achim.Z. » Mon Aug 16, 2010 2:20 pm

Hi;

I think i have to correct my statement.
The jobs are not gone, they are no longer visable in the gui!

regards
achim
Achim.Z.
Novice
 
Posts: 9
Liked: never
Joined: Mon Aug 09, 2010 6:42 am

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Mon Aug 16, 2010 2:50 pm

Achim, I haven't heard these issues reported before, so please log a support ticket with our technical team for troubleshooting steps.
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: powershell cmdlets

Veeam Logoby pavan.penmetsa » Thu Feb 24, 2011 1:42 pm

Hello,
I am working on Surebackup script. Can anyone let me know what we need to pass to the following commandlet as argument.

get-VSBTaskSession -session "?"

Please give me a clear example.

Thanks,
Pavan
pavan.penmetsa
Lurker
 
Posts: 1
Liked: never
Joined: Thu Feb 24, 2011 1:34 pm
Full Name: pavan penmetsa

Re: powershell cmdlets

Veeam Logoby flavor4real » Thu Feb 24, 2011 2:33 pm

Hello,
I'm reading through here and it's interesting. I don't know much about PowerShell cmdlt and I used the

>> Start-VBRJob Job1

but it didn't worked. the modarators helped me out and pointed me to the right directions and I found out that I have to write it like this:
>> Get-VBRJob | where {$_.Name –eq “JobName1”} | Start-VBRJob

I gave it a shot and it works for me. I'm planning to schedule a backup sequence for several overlapping jobs. Thanks for the help guys!
////////////////////////////
I found that the Cmdlet Set-VBRBackupJob is not listed under the available commands, which you can call up with Get-VBRCommand. I see, Set-VBRJobObject listed....
flavor4real
Expert
 
Posts: 205
Liked: 5 times
Joined: Mon Nov 22, 2010 7:57 pm
Full Name: DS

Re: powershell cmdlets

Veeam Logoby Alexey D. » Thu Feb 24, 2011 3:19 pm

I will ask devs and will post back.
Alexey D.
 

Re: powershell cmdlets

Veeam Logoby Vitaliy S. » Thu Feb 24, 2011 10:45 pm

flavor4real wrote:I found that the Cmdlet Set-VBRBackupJob is not listed under the available commands, which you can call up with Get-VBRCommand. I see, Set-VBRJobObject listed....

And what's the question? Have you been successfull in scheduling your jobs? What would you like to accomplish next?

Regarding Set-VBRJobObjects, here is one of the usage examples for this cmdlet: set-vbrjobobject add VC folders
Vitaliy S.
Veeam Software
 
Posts: 19575
Liked: 1104 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

PreviousNext

Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests