Q. I want to start a Windows Defender malware and spyware scan from a batch file. Does Windows Defender come with a command line utility in Windows 7?

Jan De Clercq

December 29, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Yes, Windows Defender includes a command line utility called mpcmdrun.exe that you can use to start Defender scans from a batch file. The utility is located in the %ProgramFiles%Windows Defender folder. Make sure to use an administrator-level command prompt window for all mpcmdrun commands. To see the available options for the tool, use the command

mpcmdrun.exe -?

To download the latest Defender signature files, use the command

mpcmdrun -signatureupdate

To perform a quick Defender scan of your system, use

mpcmdrun -scan -1

For a full system scan, replace 1 with 2. Note that mpcmdrun will always check for signature updates before starting the actual scan.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like