From 53eb60baa3e4e4ee621a71d17f303945564fb8d2 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Fri, 8 Nov 2024 09:01:49 +0100 Subject: [PATCH] Updated scan-folder.ps1 --- scripts/scan-folder.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/scan-folder.ps1 b/scripts/scan-folder.ps1 index c9e3ed77..b7c20c5b 100644 --- a/scripts/scan-folder.ps1 +++ b/scripts/scan-folder.ps1 @@ -1,13 +1,13 @@ <# .SYNOPSIS - Scans a folder for viruses + Scans a directory tree for malware .DESCRIPTION - This PowerShell script scans the given folder (including subfolders) for viruses. Requires the installation of ESET or Windows Defender. + This PowerShell script scans a directory tree for malware. Requires the installation of ESET or Windows Defender. .PARAMETER path Specifies the file path to the folder (default is working directory). .EXAMPLE PS> ./scan-folder.ps1 C:\Windows - ⏳ Scanning folder with ESET Antivirus... + ⏳ Scanning 📂C:\Windows with ESET Antivirus... ... .LINK https://github.com/fleschutz/PowerShell @@ -25,13 +25,13 @@ try { if (Test-Path "C:\Program Files\ESET\ESET Security\ecls.exe" -pathType leaf) { - "⏳ Scanning folder with ESET Antivirus..." + "⏳ Scanning 📂$path with ESET Antivirus..." & "C:\Program Files\ESET\ESET Security\ecls.exe" $path if ($lastExitCode -ne 0) { throw "ESET Antivirus failed with exit code $lastExitCode - POTENTIAL DANGER!!!" } } elseif (Test-Path "C:\Program Files\Windows Defender\MpCmdRun.exe" -pathType leaf) { - "⏳ Scanning folder with Windows Defender..." + "⏳ Scanning 📂$path with Windows Defender..." & "C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 2 -File $path if ($lastExitCode -ne 0) { throw "Windows Defender failed with exit code $lastExitCode - POTENTIAL DANGER !!!" }