question

MiroKarku-0155 avatar image
0 Votes"
MiroKarku-0155 asked ·

Scanning file(s) by Windows Defender in command line

Hi!

I want to scan files/folders by Windows Defender in command line.
I copied whole help from command line to text file and tried it, but it scans anything other and I don't know what really.
I used command:

"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -3 -File %path%

Where I'm not sure about scan argument - if is req'd to use the word "scan", and if, don't know if is req'd dash before scan type (normally it is not separate argument).
Also argument -File looks like not working.

Can anybody help me to fix it? And for to be sure add argument to see result to avoid else one mistake?

Thank you in advance.
Miro

not-supported
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLaude avatar image
0 Votes"
LeonLaude answered ·

Hi,

You can use the Start-MpScan PowerShell cmdlet to manually scan files with Windows Defender.
Then select what type of scan you want by defining the -ScanType switch.

 Start-MpScan -ScanPath %path% -ScanType {QuickScan | FullScan | CustomScan}


Best regards,
Leon


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered ·

Hello,

Welcome to Microsoft Q&A!

Does @LeonLaude 's answer help to solve your issue? If not, you could ask about this issue in Windows 10 General Forum. It's a better place for asking questions like yours about windows 10.


Thank you!


· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.