-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Mar 09, 2018 2:23 pm
- Full Name: Remi J. Minnebo
- Contact:
Encryption enabled notification?
Hi,
I'm trying to make a new Backup job report that includes if encryption is enabled.
We've had issues with encryption being disabled in the past while we thought we'd enabled it.
How can I query this option via powershell and make it appear in the report that's being sent whenever the backup job succeds or fails?
Thanks a bunch!
I'm trying to make a new Backup job report that includes if encryption is enabled.
We've had issues with encryption being disabled in the past while we thought we'd enabled it.
How can I query this option via powershell and make it appear in the report that's being sent whenever the backup job succeds or fails?
Thanks a bunch!
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Mar 09, 2018 2:23 pm
- Full Name: Remi J. Minnebo
- Contact:
Re: Encryption enabled notification?
I know that the type 'VBREncryptionOptions' will give me a boolean value that reflects the 'Encryption enabled' checkbox in advanced options.
So how do I select a job and query this VBREncryptionOptions via powershell, and add this to the notification mail after the job succeeds/fails.
So how do I select a job and query this VBREncryptionOptions via powershell, and add this to the notification mail after the job succeeds/fails.
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Mar 09, 2018 2:23 pm
- Full Name: Remi J. Minnebo
- Contact:
Re: Encryption enabled notification?
I've figured out how to query the StorageEncryptionEnabled type:
$JobName= "*Copy to External Disk"
$Job = Get-VBRJob -name $JobName
$Options = $Job.GetOptions()
$Options.BackupStorageOptions.StorageEncryptionEnabled
Now all I have to figure out is how to add this to the email notification.
$JobName= "*Copy to External Disk"
$Job = Get-VBRJob -name $JobName
$Options = $Job.GetOptions()
$Options.BackupStorageOptions.StorageEncryptionEnabled
Now all I have to figure out is how to add this to the email notification.
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: Encryption enabled notification?
You can just make your own email message via send-mailmessage:
https://ss64.com/ps/send-mailmessage.html
eg
you could schedule it as as a task via the windows scheduler so it sends you one report every day
https://ss64.com/ps/send-mailmessage.html
eg
Code: Select all
asnp veeampssnapin
$jobs = get-vbrjob
$report = @()
foreach($job in $jobs) {
$opt = $job.getoptions()
$report += New-Object -TypeName psobject -Property @{Name=$job.Name;"Encryption Enabled"=$opt.BackupStorageOptions.StorageEncryptionEnabled}
}
$html = ($report | ConvertTo-Html ) -join "`r`n"
Send-MailMessage -From "info@veeambackup.com" -to "user@veeambackup.com" -SmtpServer 192.168.1.14 -subject "Encryption Report" -Body $html -BodyAsHtml
-
- Novice
- Posts: 4
- Liked: 2 times
- Joined: Mar 09, 2018 2:23 pm
- Full Name: Remi J. Minnebo
- Contact:
Re: Encryption enabled notification?
Great! That works like a charm.
Thanks alot tdewin!
Thanks alot tdewin!
-
- Veteran
- Posts: 941
- Liked: 53 times
- Joined: Nov 05, 2009 12:24 pm
- Location: Sydney, NSW
- Contact:
Re: Encryption enabled notification?
Thank you @Timothy for sharing, it is still valid until now
--
/* Veeam software enthusiast user & supporter ! */
/* Veeam software enthusiast user & supporter ! */
Who is online
Users browsing this forum: Bing [Bot] and 15 guests