Skip to main content

Get all malwares detections


damien commenge
Forum|alt.badge.img+5

Hello,

With some people help me, I have this "script" to get all differents malwares detections based on date + VM name + Path.
This is usefull to avoid read several files.

 

$Path = "C:\ProgramData\Veeam\Backup\Malware_Detection_Logs\"
$Files = (Get-ChildItem -Path $Path).FullName

Select-String -Path $Files -Pattern '^\[(?<Date>[^\]]+).+\s(?<VM>[^:]+):.+?:(?<File>.+)' -AllMatches |
    ForEach-Object {
        $match = $_.Matches[0]
        [PSCustomObject]@{
            Date = $match.Groups['Date'].Value
            VM   = $match.Groups['VM'].Value
            File = $match.Groups['File'].Value
        }
     } |
     Sort-Object VM, File -Unique

 

3 comments

vAdmin
Forum|alt.badge.img+2
  • Influencer
  • 166 comments
  • April 3, 2024

Wow, that’s great script, thank you @damien commenge for sharing.


Chris.Childerhose
Forum|alt.badge.img+21
  • Veeam Legend, Veeam Vanguard
  • 8395 comments
  • April 3, 2024

That is an awesome script!  Thanks for sharing Damien.


Mahmood.Alganadi
Forum|alt.badge.img+2

Perfect ! Great script