+4 votes
147 views
How to use Windows Defender Antivirus CMD Commands

in Windows 10 by (550k points)
reopened | 147 views

1 Answer

+5 votes
Best answer

How to use Windows Defender antivirus from CMD

Microsoft Defender has been integrated into Windows 10 as a next-generation protection component to protect not only user data but also any threat that puts the integrity of the computer and its services at risk. Windows Defender uses a variety of analysis methods, detailed threat investigation, and has a Microsoft cloud infrastructure to provide user item recursion..

 

Windows Defender Features
Some of its characteristics are:

 

  • Real-time, heuristic, and behavior-based virus protection
  • Detecting and blocking insecure or untrusted applications
  • Cloud protection
  • Dedicated protection and Microsoft product updates

 

 

 

Normally, to access Windows Defender we do it from Windows Security but there is the possibility of executing these functions from the console to be able to execute these actions in the background or have special execution parameters, in this tutorial we will see how to use Windows Defend r from CMD.

 

 

To stay up to date, remember to subscribe to our YouTube channel!   SUBSCRIBE

 

How to use Windows Defender antivirus from CMD

 

Step 1

We access the CMD as administrators:

 

image

 

Step 2

Once in the console, we are going to access the Windows Defender directory by executing the following:
 cd C: \ ProgramData \ Microsoft \ Windows Defender \ Platform \ 4.18 * 
image

 

Step 3

To execute a quick scan we will execute the following command:
 MpCmdRun -Scan -ScanType 1 
image

 

 

Note
These processes take time due to the analysis that Windows Defender performs on different segments of the system and data.

 

Step 4

To run a full scan run:
 MpCmdRun -Scan -ScanType 2 
image

 

Step 5

It is possible to run a custom scan, in this case we run:
 MpCmdRun -Scan -ScanType 3 -File PATH 
image

 

Step 6

In the boot sector of the computer the vital information is housed so that Windows 10 can start without problem, in some scenarios it is possible that in these sectors errors are presented, there Windows Defender can help us to review what happens, to run a scan of the boot sectors we execute the following command:
 MpCmdRun -Scan -ScanType -BootSectorScan 
image

 

Step 7

At the end we will see something similar to this:

 

image

 

Step 8

In case Microsoft Defender Antivirus finds one or more suspicious files, they will be moved to quarantine, this is a place where suspicious files are housed to see their behavior and therefore everything related to them cannot be used.

 

It is possible that Windows Defender sends a file to the quarantine by mistake, if this is the case we will execute the following command to list the files in quarantine:

 MpCmdRun -Restore -ListAll 
Step 9

Then we can restore the file or application with the following syntax:
 MpCmdRun -Restore -Name file.exe 
Step 10

To update Windows Defender antivirus we are going to run:
 MpCmdRun -SignatureUpdate 
image

 

Step 11

This will look for whether or not there are updates available:

 

image

 

Step 12

Finally we list the help of the command:
 MpCmdRun -h 
image

 

With this option we can carry out a quick, complete or personalized scan in Windows 10 using Windows Defender antivirus..

 


by (3.5m points)

Related questions

+4 votes
3 answers
asked May 22, 2019 in Windows 10 by backtothefuture (550k points) | 662 views
+4 votes
1 answer
asked Sep 16, 2019 in Windows 10 by backtothefuture (550k points) | 262 views
+5 votes
1 answer
asked Jan 14, 2020 in Windows 10 by backtothefuture (550k points) | 314 views
+4 votes
1 answer
+5 votes
1 answer
Sponsored articles cost $40 per post. You can contact us via Feedback
10,627 questions
10,759 answers
510 comments
3 users