How to check Windows Defender status via the command line?
8,993
Use PowerShell to get the Windows Defender status information.
The command to use is Get-MpComputerStatus. It reports the status of Windows Defender services, signature versions, last update, last scan, and more.
This is the output of the command (as copied from the above link):
PS C:\> Get-MpComputerStatus
AMEngineVersion : 1.1.9700.0
AMProductVersion : 4.3.9463.0
AMServiceEnabled : True
AMServiceVersion : 4.3.9463.0
AntispywareEnabled : True
AntispywareSignatureAge : 0
AntispywareSignatureLastUpdated : 7/30/2013 3:01:45 AM
AntispywareSignatureVersion : 1.155.1107.0
AntivirusEnabled : True
AntivirusSignatureAge : 0
AntivirusSignatureLastUpdated : 7/30/2013 3:01:45 AM
AntivirusSignatureVersion : 1.155.1107.0
BehaviorMonitorEnabled : True
ComputerID : A69DA5B8-06B3-4A00-B2C1-D18ED66BAD40
ComputerState : 0
FullScanAge : 4294967295
FullScanEndTime :
FullScanStartTime :
IoavProtectionEnabled : True
LastFullScanSource : 0
LastQuickScanSource : 2
NISEnabled : False
NISEngineVersion : 2.1.9700.0
NISSignatureAge : 0
NISSignatureLastUpdated : 7/30/2013 1:30:46 PM
NISSignatureVersion : 106.0.0.0
OnAccessProtectionEnabled : True
QuickScanAge : 0
QuickScanEndTime : 7/30/2013 1:50:24 PM
QuickScanStartTime : 7/30/2013 1:49:15 PM
RealTimeProtectionEnabled : True
RealTimeScanDirection : 0
For more information see Manage Windows Defender using PowerShell.
Related videos on Youtube
Author by
Programer Beginner
Updated on September 18, 2022Comments
-
Programer Beginner over 1 year
How can I check and make sure that all Windows Defender shields and protection are on/active and that everything has a green tick:
via the Windows 10's command prompt?
Edit #1:
Per @JG7's and @harrymc's answer, I tried
Get-MpComputerStatus
command in powershell, however I received this error output:Get-MpComputerStatus : A general error occurred that is not covered by a more specific error code. At line:1 char:1 + Get-MpComputerStatus + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (MSFT_MpComputerStatus:ROOT\Microsoft\...pComputerStatus) [Get-MpComputerSta tus], CimException + FullyQualifiedErrorId : HRESULT 0x800106ba,Get-MpComputerStatus
-
JG7 about 3 yearsPowerShell can do this.
Get-MpComputerStatus | select AntivirusEnabled
This will be a nice read for you: social.technet.microsoft.com/wiki/contents/articles/… -
Programer Beginner about 3 years@JG7 unfortunately I got an error running the command. See the full error messsage in my original post (under
Edit #1
) -
JG7 about 3 yearsDo you get the same error while running PowerShell as admin?
-
Programer Beginner about 3 years@JG7 Yes, I tried to execute the command with a PowerShell as an Administrator and have same exact error message.
-
JG7 about 3 yearsthat exception code is so obscure. I did some searching on Google and this was one item that popped up. It’s not the exact case, but may set you on the right path. stackoverflow.com/questions/48960190/…
-
-
Programer Beginner about 3 yearsI got a an error running the command in powershell on my machine:
Get-MpComputerStatus : A general error occurred that is not covered by a more specific error code.
-
Programer Beginner about 3 yearsAdded the full error message in the original post (under
Edit #1
) -
harrymc about 3 yearsThis works for me. Is Windows Defender enabled on the computer? Run the following:
(Get-Service windefend).Status
that should return "Running". For starting the service:Start-Service windefend
. Some other anti-malware products may disable Windows Defender and prevent the service from starting. -
Programer Beginner about 3 yearsRunning
(Get-Service windefend).Status
, it tells me that it isStopped
. I triedStart-Service windefend
but itFailed to start service
. Yet, my Windows Defender show all green ticks (as seen in the post). -
harrymc about 3 yearsWhat do you get for:
Get-Command -Module Defender
? You should get a list that includesGet-MpComputerStatus
. Also, what is your Windows 10 version?