Src/Private/Report/Get-AbrVbrMalwareDetectionOption.ps1
|
function Get-AbrVbrMalwareDetectionOption { <# .SYNOPSIS Used by As Built Report to returns Malware Detection Option settings configured on Veeam Backup & Replication.. .DESCRIPTION Documents the configuration of Veeam VBR in Word/HTML/Text formats using PScribo. .NOTES Version: 0.8.13 Author: Jonathan Colon Twitter: @jcolonfzenpr Github: rebelinux Credits: Iain Brighton (@iainbrighton) - PScribo module .LINK https://github.com/AsBuiltReport/AsBuiltReport.Veeam.VBR #> [CmdletBinding()] param ( ) begin { Write-PScriboMessage "Discovering Veeam VBR Malware Detection Option settings information from $System." $LocalizedData = $reportTranslate.GetAbrVbrMalwareDetectionOption Show-AbrDebugExecutionTime -Start -TitleMessage 'Malware Detection' } process { try { $MalwareDetectionOption = Get-VBRMalwareDetectionOptions Section -Style Heading4 $LocalizedData.Heading { Paragraph $LocalizedData.Paragraph BlankLine $OutObj = @() $inObj = [ordered] @{ $LocalizedData.InlineEntropyAnalysis = $MalwareDetectionOption.InlineMalwareScanEnabled $LocalizedData.Sensitivity = $MalwareDetectionOption.Sensitivity $LocalizedData.FileSystemActivityAnalysis = $MalwareDetectionOption.GuestIndexScanEnabled $LocalizedData.UpdateMalwareDefinitionAutomatically = $MalwareDetectionOption.UpdateExtensionsListPeriodically $LocalizedData.IndicatorsOfCompromiseEnabled = $MalwareDetectionOption.UseIndicatorsOfCompromiseEnabled $LocalizedData.SignatureDetection = switch ($MalwareDetectionOption.DetectionEngine) { 'VeeamThreatHunter' { $LocalizedData.VeeamThreatHunter } 'External' { $LocalizedData.BringYourOwnAntivirus } } $LocalizedData.SignatureDetectionScanArchives = $MalwareDetectionOption.ScanArchives $LocalizedData.FileMaskSuspiciousExtensions = $MalwareDetectionOption.SuspiciousExtensions -join ',' $LocalizedData.FileMaskNonSuspiciousExtensions = $MalwareDetectionOption.NonSuspiciousExtensions -join ',' $LocalizedData.IncidentAPIQuickBackupOnExternalEvent = $MalwareDetectionOption.QuickBackupOnExternalEventEnabled $LocalizedData.SendSNMPNotification = $MalwareDetectionOption.NotificationOptions.EnableSnmpNotification $LocalizedData.SendEmailNotification = $MalwareDetectionOption.NotificationOptions.EnableAdditionalNotification $LocalizedData.AdditionalEmailAddress = $MalwareDetectionOption.NotificationOptions.AdditionalAddress $LocalizedData.UseCustomNotificationSettings = $MalwareDetectionOption.NotificationOptions.UseNotificationOptions $LocalizedData.NotifyOnSuccess = $MalwareDetectionOption.NotificationOptions.NotifyOnSuccess $LocalizedData.NotifyOnWarning = $MalwareDetectionOption.NotificationOptions.NotifyOnWarning $LocalizedData.NotifyOnError = $MalwareDetectionOption.NotificationOptions.NotifyOnError } $OutObj += [pscustomobject](ConvertTo-HashToYN $inObj) if ($HealthCheck.Infrastructure.Settings) { $OutObj | Where-Object { $_."$($LocalizedData.UpdateMalwareDefinitionAutomatically)" -eq 'No' } | Set-Style -Style Warning -Property $LocalizedData.UpdateMalwareDefinitionAutomatically } $TableParams = @{ Name = "$($LocalizedData.TableHeading) - $VeeamBackupServer" List = $true ColumnWidths = 40, 60 } if ($Report.ShowTableCaptions) { $TableParams['Caption'] = "- $($TableParams.Name)" } $OutObj | Table @TableParams } } catch { Write-PScriboMessage -IsWarning "Malware Detection Option Section: $($_.Exception.Message)" } } end { Show-AbrDebugExecutionTime -End -TitleMessage 'Malware Detection' } } |