PowerShell script exchange
Post Reply
sidavid
Enthusiast
Posts: 63
Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:

Change Option in Bulk

Post by sidavid »

Hi,
I want to change these settings:

failtonetwork at false
UseChangeTracking at true
EnableChangeTracking at true

for all my jobs.

I have tried this script but without success:

Get-VBRJob | foreach {
$job = Get-VBRJob | ?{$_.Name -eq $vbrjobname}
Set-VBRJobOptions ($job) -EnableChangeTracking True
Set-VBRJobOptions ($job) -failtonetwork False
Set-VBRJobOptions ($job) -UseChangeTracking True
$job.Save()

Thanks
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Change Option in Bulk

Post by Sethbartlett »

You cannot just do ChangedBlockTracking, etc the way you are wanting to do it.

Version 6

Code: Select all

$Job = Get-VBRJob | ?{$_.name -eq "JobName"}
$Options = $Job.Options
$Options.ViSourceOptions.UseChangeTracking = $true
$Options.ViSourceOptions.EnableChangeTracking = $true
$Options.ViSourceOptions.FailoverToNetworkMode = $false
$Job.SetOptions($Options)
If you need version 5, please let me know and make sure to post this when you ask powershell questions :D
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests