Running McCmdRun from Command Prompt Appears to never finish while right-clicking and scanning takes around three seconds.


  • I'm trying to automate scanning of our release candidates by calling

    "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "C:\Users\me\Desktop\foldertotest" -DisableRemediation

    and I get

    Scan starting...

    ...and I wait for a few hours and never see it finish. I opened the Desktop in Windows Explorer and right-clicked and scanned the folder with Windows Defender and it finished in about 3 seconds.

    Does anyone know why my other command is not finishing?

    Thursday, April 5, 2018 5:33 PM

All replies

  • The exact same command works fine for me. Is there any unusual CPU or other resource usage happening when you initiate the scan via MpCmdRun? You might also want to try capturing a trace with Sysinternals Process Monitor. | @kevmjohnston

    Friday, April 6, 2018 1:38 PM