-
- Expert
- Posts: 227
- Liked: 62 times
- Joined: Apr 10, 2014 4:13 pm
- Contact:
Powershell to set "Append to the existing attribute's value"
Hey All,
So using Set-VBRJobAdvancedViOptions I can set which attribute to send Veeam's info to:
http://helpcenter.veeam.com/backup/80/p ... tions.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!
So using Set-VBRJobAdvancedViOptions I can set which attribute to send Veeam's info to:
http://helpcenter.veeam.com/backup/80/p ... tions.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!
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell to set "Append to the existing attribute's va
You can disable that option, using the script provided below:
Thanks.
Code: Select all
$Job = Get-VBRJob -name "Name of your backup Job"
$Options = $Job.Getoptions()
$Options.ViSourceOptions.VmNotesAppend = $False
$Job.SetOptions($Options)
-
- Expert
- Posts: 227
- Liked: 62 times
- Joined: Apr 10, 2014 4:13 pm
- Contact:
Re: Powershell to set "Append to the existing attribute's va
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.
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.
-
- Product Manager
- Posts: 20413
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Powershell to set "Append to the existing attribute's va
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.
Thanks.
Code: Select all
$Job = Get-VBRJob -name "Name of your Job"
$Job | Get-Member
-
- Novice
- Posts: 8
- Liked: 3 times
- Joined: Oct 03, 2012 4:57 am
- Full Name: Alexandr Varlamov
- Location: Russia, Moscow
- Contact:
Re: Powershell to set "Append to the existing attribute's va
Hi All.
Convenient way to explore job options is type "$job.Options." and press Tab button
For example output of $job.Options.ViSourceOptions command
After you'll know options you need, you could modify several backup jobs, one by one:
Hope it helps.
Convenient way to explore job options is type "$job.Options." and press Tab button
For example output of $job.Options.ViSourceOptions command
Code: Select all
EncryptLanTraffic : False
FailoverToNetworkMode : False
VCBMode : san
VDDKMode : san;nbd
UseChangeTracking : True
EnableChangeTracking : True
VMToolsQuiesce : False
VmAttributeName : Notes
BackupTemplates : True
ExcludeSwapFile : True
DirtyBlocksNullingEnabled : True
BackupTemplatesOnce : True
SetResultsToVmNotes : False
VmNotesAppend : True
Code: Select all
#add veeam pssnapin if needed
if (Get-PSSnapin | findstr 'VeeamPSSnapin') {Write-Host 'ok'} else {Add-PSSnapin VeeamPSSnapin}
# set backup jobs list
$jobs = Get-VBRJob -Name '*test*'
# for each job do needed things
foreach ($job in $jobs)
{
$Options = $Job.Getoptions()
$Options.ViSourceOptions.VmNotesAppend = $false
$Options.ViSourceOptions.VmAttributeName = 'veeam'
$Options.ViSourceOptions.SetResultsToVmNotes = $true
$Job.SetOptions($Options)
}
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: Powershell to set "Append to the existing attribute's va
Here is a dump of the job options
https://github.com/VeeamHub/powershell/ ... Options.md
https://github.com/VeeamHub/powershell/ ... Options.md
Who is online
Users browsing this forum: No registered users and 2 guests