Powershell to set "Append to the existing attribute's value"

PowerShell script exchange

Powershell to set "Append to the existing attribute's value"

Veeam Logoby lightsout » Fri Jan 30, 2015 4:41 pm

Hey All,

So using Set-VBRJobAdvancedViOptions I can set which attribute to send Veeam's info to:

http://helpcenter.veeam.com/backup/80/powershell/set-vbrjobadvancedvioptions.html

Using the -VmAttributeName & -SetResultsToVmAttribute. So the "Append to the existing attribute's value" is a new feature of v8 and I want to turn it off, as all my jobs have it on by default.

Does anyone know how to change it? I don't see a way using Set-VBRJobAdvancedViOptions.

Thanks!
lightsout
Expert
 
Posts: 185
Liked: 47 times
Joined: Thu Apr 10, 2014 4:13 pm

Re: Powershell to set "Append to the existing attribute's va

Veeam Logoby v.Eremin » Mon Feb 02, 2015 10:49 am 1 person likes this post

You can disable that option, using the script provided below:

Code: Select all
$Job = Get-VBRJob -name "Name of your backup Job"
$Options = $Job.Getoptions()
$Options.ViSourceOptions.VmNotesAppend = $False
$Job.SetOptions($Options)


Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell to set "Append to the existing attribute's va

Veeam Logoby lightsout » Mon Feb 02, 2015 10:26 pm

That did it, thanks a lot!

Just some feedback, I do find it hard to browse the Powershell reference library to find what I want. So a "dummy's guide" for how to change each switch in PowerShell would be kinda cool. :)
lightsout
Expert
 
Posts: 185
Liked: 47 times
Joined: Thu Apr 10, 2014 4:13 pm

Re: Powershell to set "Append to the existing attribute's va

Veeam Logoby v.Eremin » Tue Feb 03, 2015 9:31 am

There are numerous properties and methods existing inside our PS objects. So, it would be rather hard to enumerate them all. What I typically recommend is to assign this or that particular object to a variable, and use Get-Member commandlet to discover available properties.

Code: Select all
$Job = Get-VBRJob -name "Name of your Job"
$Job | Get-Member


Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests