PowerShell script exchange
sidavid
Enthusiast
Posts: 63 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » Jun 12, 2013 7:50 pm
this post
Hi All,
Can someone help me to write a small powershell script to uncheck the Use Changed Tracking Data on all my jobs?
Code: Select all
Get-VBRJob | {
$vo = $job.GetOptions()
$vo.(Use Changed tracking Data, I do not know the option) = 0
$job.SetOptions($vo)
}
Thanks
veremin
Product Manager
Posts: 20285 Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Jun 13, 2013 8:39 am
this post
I believe the following script will answer your requirements:
Code: Select all
asnp VeeamPSSnapin
foreach ($Job in Get-VBRJob)
{
$Options = $Job.GetOptions()
$Options.ViSourceOptions.UseChangeTracking = $False
$Job.SetOptions($Options)
}
Hope this helps.
Thanks.
sidavid
Enthusiast
Posts: 63 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » Jun 13, 2013 3:05 pm
this post
Hi
Good thanks!
And just to my knowledge if I want to put the Enable CBT for all protected VM at ON.
Do you know the command?
Thanks
veremin
Product Manager
Posts: 20285 Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Jun 13, 2013 3:16 pm
this post
Yep, all you need to do is to replace $False absolute symbol with $True one:
Code: Select all
asnp VeeamPSSnapin
foreach ($Job in Get-VBRJob)
{
$Options = $Job.GetOptions()
$Options.ViSourceOptions.UseChangeTracking = $True
$Job.SetOptions($Options)
}
Hope this helps.
Thanks.
sidavid
Enthusiast
Posts: 63 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » Jun 15, 2013 1:03 am
this post
Hi,
Hum, I mean to configure the CBT, you have 2 checks boxes, I mean the checkbox of the bottom. This one $Options.ViSourceOptions.UseChangeTracking is for the checkbox on the top.
Thanks
veremin
Product Manager
Posts: 20285 Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Jun 17, 2013 8:26 am
this post
Ok, then the following line should be added:
Code: Select all
asnp VeeamPSSnapin
foreach ($Job in Get-VBRJob)
{
$Options = $Job.GetOptions()
$Options.ViSourceOptions.UseChangeTracking = $True
$Options.ViSourceOptions.EnableChangeTracking = $True
$Job.SetOptions($Options)
}
Hope this helps.
Thanks.
sidavid
Enthusiast
Posts: 63 Liked: 1 time
Joined: Jan 01, 2006 1:01 am
Contact:
Post
by sidavid » Jun 17, 2013 11:41 am
this post
Thanks work! Many thanks
veremin
Product Manager
Posts: 20285 Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Jun 17, 2013 12:02 pm
this post
You’re welcome. Should any other help be needed, feel free to contact us. Thanks.
Users browsing this forum: No registered users and 7 guests