T tobwen Well-Known Member Joined Oct 17, 2020 Messages 25 Oct 29, 2020 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
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
Solution Neemobeer Oct 29, 2020 if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus }
if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus }
Neemobeer Cloud Security Engineer Staff member Joined Jul 4, 2015 Messages 8,986 Oct 29, 2020 #2 if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus } Upvote 0 Downvote Solution
if((Get-Service -Name WinDefend).Status -ne "Running") { Write-Output "Defender Service not running" } else { Get-MpComputerStatus }
T tobwen Well-Known Member Joined Oct 17, 2020 Messages 25 Oct 29, 2020 Thread Author #3 Thank you. But is there a non-Powershell check as well? Upvote 0 Downvote
Neemobeer Cloud Security Engineer Staff member Joined Jul 4, 2015 Messages 8,986 Oct 29, 2020 #4 sc query windefend Upvote 0 Downvote