There are times when it is more convenient to run programs from the command line rather than the Windows UI. I have setup 2 shortcuts on my desktop to run a quick scan and a full scan. This means I don’t need to navigate through the Windows UI to run Windows Defender Antivirus. To do this, I have setup 2 batch files to run the scans.

This batch file will make sure you have the latest virus signatures and then run a quick scan (note that even the quick scan can take awhile). Best to run with administrator rights too. Note if you change the -ScanType to a 2, you will get a full scan.

echo off
cd %ProgramFiles%\Windows Defender\
MpCmdRun -SignatureUpdate
MpCmdRun -Scan -ScanType 1
echo “Windows Defender run finished”