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?

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.