The MSE console tool MpCmdRun.exe‘s command-line help displays the parameters and flags to be used to initiate a scan. Here is the line that I’m talking about.

-Scan [-ScanType]        Scans for malicious software

And the ScanType can be 1 (Quick scan) or 2 (for Full scan)

Anyone who reads the help text would think that the following command-line is to be used for running a scan:

MpCmdRun.exe -Scan -1

(or)

MpCmdRun.exe -Scan -2

But that’s not the syntax Microsoft Security Essentials expects. If you had used the above commands, the Microsoft Security Essentials always initiates the default scan type chosen in the Settings page of the Microsoft Security Essentials utility. That is, it defaults to Quick Scan (which is the default setting) regardless of the flag used. You can verify that using the Event Viewer. For every scan initiated, there is an event log entry generated.

Correct Syntax for Command-Line Scan

Here is the correct syntax (via Microsoft Answers forums) for running a command-line scan:

[Quick Scan]

MpCmdRun.exe -Scan -ScanType 1

[Full Scan]

MpCmdRun.exe -Scan -ScanType 2

Editor’s Note: In case you’re wondering what a "Quick Scan" does…. The "Quick Scan" option scan the areas of your computer that malicious software is most likely to infect. Whereas the "Full Scan" checks the entire hard drive and even scans the files inside ZIP and CAB archives by default.

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

3 Comments

  1. Rick
    said this on Tuesday, August 10th 2010 6:48 am

    “For some reason -scan -scantype 1 always does a signature update. I’m missing something.”

    Same problem here, a signature update is all I cab get it to do from the command line.

  2. Zane Clair Greene
    said this on Monday, March 22nd 2010 8:35 am

    For some reason -scan -scantype 1 always does a signature update. I’m missing something.

Leave a Reply