diff options
| author | WindowsAddict | 2025-07-02 18:16:34 +0000 |
|---|---|---|
| committer | WindowsAddict | 2025-07-02 18:16:34 +0000 |
| commit | c817ae8bd984a5db42006ca16a0e68d9020db3c6 (patch) | |
| tree | 6d7dbd0f7e164f12dbd9487a5e1df38eac92d36e /MAS/Separate-Files-Version/Troubleshoot.cmd | |
| parent | ef411e14ca2e46177decfe3c2b01db7f535b01ba (diff) | |
| download | Microsoft-Activation-Scripts-c817ae8bd984a5db42006ca16a0e68d9020db3c6.zip | |
Add detection for Microsoft Defender for Endpoint
Diffstat (limited to 'MAS/Separate-Files-Version/Troubleshoot.cmd')
| -rw-r--r-- | MAS/Separate-Files-Version/Troubleshoot.cmd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/MAS/Separate-Files-Version/Troubleshoot.cmd b/MAS/Separate-Files-Version/Troubleshoot.cmd index 0064aa4..2989d4a 100644 --- a/MAS/Separate-Files-Version/Troubleshoot.cmd +++ b/MAS/Separate-Files-Version/Troubleshoot.cmd @@ -252,6 +252,10 @@ echo PowerShell is not working properly. Aborting... if /i "!tstresult2!"=="FullLanguage" (
echo:
echo Your antivirus software might be blocking the script, or PowerShell on your system might be corrupted.
+echo:
+sc query sense | find /i "RUNNING" %nul% && (
+echo Installed Antivirus - Microsoft Defender for Endpoint
+)
cmd /c "%psc% ""$av = Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct; $n = @(); foreach ($i in $av) { $n += $i.displayName }; if ($n) { Write-Host ('Installed Antivirus - ' + ($n -join ', '))}"""
)
|
