PowerShell script exchange
Post Reply
marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Copy-VBRJob - description bug

Post by marc.rousseau »

Hello,

I created a "Template" job with an empty description
I want to clone this job with Copy-VBRJob (with different datastores as source backup)
Cloning operation works fine but Description field is empty for all cloned jobs despite the fact I use the Copy-VBRJob -Description "xxxxx"

Looks like a bug
Can someone confirm this behavior ?
Thanks
Marc

Code: Select all

foreach ($datastore in $datastores_only_netapp) {

$crm = Find-VBRViEntity -DatastoresAndVMs -Name $datastore | Where-Object {$_.Path -like 'euhvmwap11*'}

$Job_template = Get-VBRJob -Name "_template_for_netapp"
$job=Copy-VBRJob -Job $job_template -NAme $job_name -Description "$datastore snapnetapp_snapvm (ret=93)"
#ajoute le datastore dans le clone du template
Add-VBRViJobObject -Job $job -Entities $crm

}

marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Re: Copy-VBRJob - description bug

Post by marc.rousseau »

Case 02128975
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Copy-VBRJob - description bug

Post by veremin »

It's a known issue. According to the plan, it should be fixed in version 10. Thanks.
marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Re: Copy-VBRJob - description bug

Post by marc.rousseau »

Thanks for the feeedback. When v10 will be released ?
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Copy-VBRJob - description bug

Post by veremin »

We cannot share ETA at the moment. Thanks.
marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Re: Copy-VBRJob - description bug

Post by marc.rousseau »

Ok I unterstand.
I found a temporary workaround with editing description field into Veeam SQL database :

Image
veremin
Product Manager
Posts: 20415
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Copy-VBRJob - description bug

Post by veremin »

Yep, correcting db manually always comes to the rescue, playing the role of the "last resort". Glad to hear that you've found a workaround.
znabela
Service Provider
Posts: 13
Liked: 5 times
Joined: Dec 04, 2014 7:09 am
Full Name: Robert Christiansen
Contact:

[MERGED] Change job description field via powershell

Post by znabela »

Not that I want to bark up an old tree, but ...

Is it possible to change the content of "Description" field in powershell with Veeam 9.5 (still in a supported way?)

I think the SQL query way is a hack, best suited for homelabs! ;)
Robert Christiansen
Infrastructure Specialist @ Danoffice IT
marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Re: Change job description field via powershell

Post by marc.rousseau »

I tried everything with powershell to change description field (including hacks in this post) but the only solution I found, is to edit database :

powershell-f26/copy-vbrjob-description- ... ml#p238058

Code: Select all

##### SQL variables
$server="SERVER\VEEAMSQL2012"
$db="VeeamBackup"
$table="dbo.BJobs"

#Update description 
Invoke-Sqlcmd -Query "UPDATE $table set description='new_description' WHERE name='job_name_to_modify';" -ServerInstance $server -Database $db
twesterd
Influencer
Posts: 17
Liked: 3 times
Joined: May 17, 2017 7:38 pm
Full Name: Trevor W
Contact:

[]MERGED] Description not added when Cloning Job

Post by twesterd »

Below is the code for PowerShell that I used to Clone a job. The job is cloning, but the description is not applied. Is there something off in my code, or is this a bug?

Code: Select all

$job = Get-VBRJob -Name "Template Windows Backup Jobs"
Copy-VBRJob -Job $job -Name "Template Test Clone" -Description "Description of new job"
marc.rousseau
Enthusiast
Posts: 26
Liked: 11 times
Joined: May 01, 2014 9:48 am
Full Name: marc.rousseau
Contact:

Re: Description not added when Cloning Job

Post by marc.rousseau »

Hello,

Known bug. Will be fixed in v10
Workaround: SQL query to edit database

powershell-f26/copy-vbrjob-description- ... ml#p237899
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests