From 9f1ed5c2181a024858cf8507743075e5262e121c Mon Sep 17 00:00:00 2001 From: dinger1986 Date: Sun, 15 Oct 2023 11:57:09 +0100 Subject: [PATCH] Delete scripts/Win_Antivirus_Check.ps1 --- scripts/Win_Antivirus_Check.ps1 | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/Win_Antivirus_Check.ps1 diff --git a/scripts/Win_Antivirus_Check.ps1 b/scripts/Win_Antivirus_Check.ps1 deleted file mode 100644 index 83a95231..00000000 --- a/scripts/Win_Antivirus_Check.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -<# - .SYNOPSIS - This script checks and returns the name of the active antivirus on a Windows system. - - .DESCRIPTION - If Windows Defender's RealTimeProtection is disabled, the script queries for the primary active AV from SecurityCenter2 it - returns "No active antivirus detected." if no other Antivirus is found. - - .NOTES - Created by: dinger1986 - Date: 15/10/23 -#> - -# Check if Windows Defender RealTimeProtection is enabled -$DefenderStatus = (Get-MpComputerStatus).RealTimeProtectionEnabled - -if (-not $DefenderStatus) { - # If Windows Defender's RealTimeProtection is disabled, query for the active AV from SecurityCenter2 - $ActiveAV = Get-CimInstance -Namespace Root\SecurityCenter2 -ClassName AntiVirusProduct | - Where-Object {$_.productState -eq 266240} | - Select-Object -ExpandProperty displayName -First 1 - - # Check if another AV is found - if ($ActiveAV) { - # Output the name of the active AV - $ActiveAV - } else { - "No active antivirus detected." - } -} else { - "Windows Defender" -}