PowerShell script exchange
Post Reply
NorbertB
Novice
Posts: 3
Liked: 2 times
Joined: Aug 04, 2020 8:54 am
Full Name: Norbert Bans
Contact:

Email-Notification on File Copy Jobs

Post by NorbertB » 2 people like this post

Dear all,
No idea, if this has ever been mentioned here before. If so, sorry, I did not find this in the forum.
Wrong place for the article? Sorry, please move to the proper location...
Via google search I just dicovered one article covering this from this forum, but that addressed the issue for the very old version 7 of the VBR and it did not have a solution.

If email notification on File Copy Jobs is needed but the general notification option shouldn't or can't be used you are normally stuck without proper email notification for your file copy jobs... I found a simple solution to achieve this even though the file copy jobs do not have any kind of notification tab inside the GUI. I just used the Veeam Powershell and configured the notification via the following simple one-liner

Code: Select all

Get-VBRJob -Name "The File Copy Job Name" | Set-VBRJobAdvancedNotificationOptions -SnmpNotification $False -EmailNotification $True -EmailNotificationAddresses "name1@email.com, name2.surname@your.domain.tld"
This configuration persists Management App restarts and Server reboots, it seems that the file copy jobs internally have notification settings but just the GUI does neither show nor configure them... I would assume that you may skip the -SnmpNotification parameter but I just didn't test this.

Greetz, NorbertB
oleg.feoktistov
Veeam Software
Posts: 2010
Liked: 670 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Email-Notification on File Copy Jobs

Post by oleg.feoktistov » 1 person likes this post

Hi Norbert,

Thanks for sharing! Yes, in powershell it has a bit distinct implementation. Since it is retrievable with a base cmdlet, base operations on this job class are also available.

Best regards,
Oleg
VCFP
Influencer
Posts: 10
Liked: 2 times
Joined: Jul 31, 2020 9:52 am
Contact:

Re: Email-Notification on File Copy Jobs

Post by VCFP »

I have used this workaround and found that the slightest change of the copy job configuration (even only the name) removed the notification options set through Set-VBRJobAdvancedNotificationOptions.
Shouldn't there be a corresponding Get-VBRJobAdvancedNotificationOptions to view the configuration?
david.domask
Veeam Software
Posts: 2123
Liked: 513 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: Email-Notification on File Copy Jobs

Post by david.domask »

Hi VCFP,

Just a note that while this is indeed possible, it's a bit of a "hack" to get this working, so I ask your understanding that there will be some "exploration" required if you're going to use this workaround.

You can view the NotificationOptions Property on the CJobOptions object returned by Get-VBRJobOptions. Pass the file-copy job on the -Job parameter, and check the NotiticationOptions property on the returned object to see the Notification Settings.
David Domask | Product Management: Principal Analyst
VCFP
Influencer
Posts: 10
Liked: 2 times
Joined: Jul 31, 2020 9:52 am
Contact:

Re: Email-Notification on File Copy Jobs

Post by VCFP » 1 person likes this post

Thanks for this hint, david.domask.

I had looked at the options object but missed the step of examining the attribute "NotificationOptions" where I can check "SendEmailNotification2AdditionalAddresses" and "EmailNotificationAdditionalAddresses"

"Exploration" could well be part of my job description :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests