'C:Program FilesWindows DefenderMSASCui.exe' -UpdateAndQuickScan. 'C:Program FilesWindows DefenderMpCmdRun.exe' -Scan ScanType 1. The Windows Defender executable MSASCui.exe supports the following switches, which you can set to run using Scheduler or by creating desktop shortcuts. MSASCui.exe (GUI) Supported Switches Update definitions and then run a Quick Scan 'C:Program FilesWindows DefenderMSASCui.exe' -UpdateAndQuickScan Run a Quick Scan.
Windows Defender is the built-in security app bundled by default with Windows since Windows Vista. Although Microsoft claims that it offers only baseline antivirus protection, it's better to have to preinstalled and running than to have no antimalware at all. If you have Windows Defender enabled, you might find this trick useful to update it and then perform a Quick Scan with just one click.
RECOMMENDED: Click here to fix Windows errors and optimize system performance
It is possible to create a special shortcut to update Windows Defender virus signatures and then start a quick scan immediately.
Tip: Download Windows Defender offline updates for Windows 10.
This trick involves the console MpCmdRun.exe utility which is a part of Windows Defender and used mostly for scheduled scanning tasks and IT administrators.
The MpCmdRun.exe tool has a number of command line switches which can be viewed by running MpCmdRun.exe with '/?'. However, there is an undocumented switch, SignatureUpdateAndQuickScan which is useful in our case.
To update Windows Defender and run Quick Scan with one click, follow the instruction below.
To update Windows Defender and run Quick Scan with one click, follow the instruction below.
- Right click the Desktop and select New - Shortcut.
- In the shortcut target box, type or copy-paste the following command:See the following screenshot:
- Type some useful name for your new shortcut:
- For the shortcut icon, refer to the following file:
You are done.
Now let's test our shortcut. Double click it.
First, it will update its signatures:
And next, it will begin a quick scan:
After it is finished, you will find the scan results in Event Viewer, inside MicrosoftWindowsWindows DefenderOperational Journal under the latest 'Information' record:
That's it. This trick works in Windows 10 and Windows 8. I haven't checked it in earlier versions of Windows. Now read: Enable Anti-Adware feature in Windows Defender.
RECOMMENDED: Click here to fix Windows errors and optimize system performance
Windows Defender is the free antivirus software that Microsoft has created to offer the first line of defense against malware on PCs. The security software comes built-in on Windows 10 and Windows 8.1, and it identifies and removes viruses, spyware, rootkits and bootkits, and a number of other malicious code.
The software most of the time runs quietly in the background, and it includes a very easy to use interface. However, what you probably didn't know is that you can also use Windows Defender with command lines, which can come in handy in a number of scenarios, including when you're trying to automate certain tasks using Task Scheduler.
Interesting enough, there are at least two ways to use Windows Defender with Command Prompt: You can either use MSASCui.exe, which allows you to control the antivirus Graphical User Interface (GUI) using command lines. Or you can use MpCmdRun.exe, which is the official command line utility with more options and commands run silently in the background by default.
In this Windows 10 guide, we'll walk you through the command lines to use Windows Defender on your computer.
How to use Windows Defender with Command Prompt
The following commands using MSASCui.exe let you update and run the Windows Defender different scan modes, but every execution will launch the application to perform the task and you get limited options compared to the MpCmdRun.exe utility.
Use the Windows key + I keyboard shortcut to open the Power User menu and select Command Prompt (Admin), then:
To trigger an update check followed by a quick virus scan, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMSASCui.exe' -UpdateAndQuickScan
To download and install updates for Windows Defender, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMSASCui.exe' -Update
To perform a quick Windows Defender scan, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMSASCui.exe' -QuickScan
To perform a full scan, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMSASCui.exe' -FullScan
Quick Tip: You can also append the -hide switch at the end of each command to prevent the Windows Defender from opening up. Here's an example: 'C:Program FilesWindows DefenderMSASCui.exe' -UpdateAndQuickScan -hide.
How to use Windows Defender silently with Command Prompt
Windows Defender also includes a command-line utility, MpCmdRun.exe, which you can use to automate or run tasks silently without having to launch the desktop client.
Use the Windows key + I keyboard shortcut to open the Power User menu and select Command Prompt (Admin), then:
To trigger a signature update, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -SignatureUpdate
To perform a quick scan, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -Scan -ScanType 1
To perform a full Windows Defender scan, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -Scan -ScanType 2
To do a custom scan for a file or folder instead of scanning your entire system, type the following command and press Enter:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -Scan -ScanType 3 -File PATH-TO-FILE-OR-FOLDER
Here's an example that scans all the files and folders within the Public folder:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -Scan -ScanType 3 -File C:UsersPublic
You can also scan and remove any malicious code that may have infected the boot sector with the following command:
'%ProgramFiles%Windows DefenderMpCmdRun.exe' -Scan -ScanType -BootSectorScan
Keep in mind that we're only listing the most useful commands, you can also run the following command to view a handful of other switches to use alongside the MpCmdRun.exe utility.
'%ProgramFiles%Windows DefenderMpCmdRun.exe'
Finally, it's important to note that while we're focusing this guide on Windows 10, these instructions should also be compatible with previous versions of the operating system, including Windows 7 and Windows 8.1.
More Windows 10 resources
For more help articles, coverage, and answers on Windows 10, you can visit the following resources:
Living in the futureWill Xbox Series X games be held back by previous Xbox hardware?
People are scared that games won't look good on the Xbox Series X because it won't have any exclusives at launch. That's silly. Silly AF.