📎 AI Summary:
The thread discusses how to check if Windows Defender and its Real-Time Protection are enabled via the command line. The original poster questions whether certain tools are suitable and seeks alternative methods, preferably without PowerShell. Responders suggest using PowerShell commands and the "sc query windefend" command to verify Defender's status, indicating practical solutions for both PowerShell and non-PowerShell checks. The overall tone is informative and solution-oriented.

tobwen

Well-Known Member
Joined
Oct 17, 2020
Messages
25
Thread Author #1
How can I check from command line if Defender is currently enabled?

How can I check from command line if Defender is currently enabled AND RealTimeProtection enabled?

I don't know if the tools MSASCui.exe and MpCmdRun.exe are suitable for this task.

If Defender is disabled they probably don't work and can not return a result.

So maybe a Powershell command or other would be more suitable
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus }
 

Solution

tobwen

Well-Known Member
Joined
Oct 17, 2020
Messages
25
Thread Author #3
Thank you.
But is there a non-Powershell check as well?