Updating Microsoft Security Essentials Using Command-Line

Microsoft Security Essentials includes a command-line utility which can be used to update the virus/malware definitions, initiate a scan, undo a recent definition update and perform other tasks. To know how to use the command-line utility, open a Command Prompt window (CMD.EXE) and execute the following command:

"%ProgramFiles%\Microsoft Security Essentials\MpCmdRun.exe" /?

Command Description
-? / -h Displays all available options for this tool.
-Trace [-Grouping #] [-Level #] Starts diagnostic tracing
-RemoveDefinitions [-All] Restores the installed signature definitions to a previous backup copy or to the original default set of signatures
-RestoreDefaults Resets the registry values for Microsoft Antimalware Service settings to known good defaults
-SignatureUpdate [-UNC] Checks for new definition updates
-Scan [-ScanType] Scans for malicious software
-Restore -Name <name> [-All] Restore the most recently or all quarantined item(s) based on name
-GetFiles Collects support information

In addition to the above information, detailed information for each command-line parameter is shown when you run the above command.

To update the MSE virus/malware definitions, use this command:

"%ProgramFiles%\Microsoft Security Essentials\MpCmdRun.exe" -SignatureUpdate

The command-line tool can be useful if you want to update MSE using Batch file, Script or using Task Scheduler.

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

4 thoughts on “Updating Microsoft Security Essentials Using Command-Line”

  1. I was able to update the virus definitions with the following code:
    cd “%ProgramFiles%\Microsoft Security Essentials\”
    MpCmdRun.exe -SignatureUpdate

    But unable to start a scan with the following code in the same batch file:
    START msseces.exe -Scan -ScanType 0

    what gives?

  2. ———-UPDATE-MSE.CMD———-

    @color F3
    @timeout /t 40
    @echo off
    “C:\Program Files\Microsoft Security Client\MpCmdRun.exe” -SignatureUpdate -MMPC
    @timeout /t 10


Comments are closed.