PowerShell script exchange
mcclans
Influencer
Posts: 16 Liked: 2 times
Joined: Feb 17, 2015 2:05 pm
Full Name: Shawn McClanahan
Contact:
Post
by mcclans » Apr 04, 2016 3:47 pm
this post
So I used v.Eremin's info to change all the backup / repl jobs to enable bit looker which worked great.
Code: Select all
asnp VeeamPSSNapin
foreach ($Job in Get-VBRJob | where {$_.JobType -eq "Backup" -or $_.JobType -eq "Replica"})
{
$Options = $Job.GetOptions()
$Options.ViSourceOptions.DirtyBlocksNullingEnabled = $True
$Job.SetOptions($Options)
}
This got me thinking it would be nice to set other jobs options via the same method but I'm failing to see where to list all available job options to ensure uniformity across all jobs. I'm sure that I'm overlooking something simple. I was reading Luca's post on something similar but still failing to see how to list all job options.
http://www.virtualtothecore.com/en/chec ... owershell/
Any pointers appreciated
veremin
Product Manager
Posts: 20413 Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:
Post
by veremin » Apr 05, 2016 10:03 am
this post
Most of the jobs options can be found under $Job.GetOptions(). Typical solution looks like the following:
1) Assign GetOptions() to a variable
2) Tweak the variable however you like
3) Pass the changed variable to a job using .SetOptions() method
Thanks.
Users browsing this forum: No registered users and 5 guests