Windows 10 Check from cmdline (with MSASCui or MpCmdRun) if Defender is running?

tobwen

Well-Known Member
Joined
Oct 17, 2020
Messages
25
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
 


if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus }
 


Solution
Back
Top