Windows 10: Scanning for viruses with Windows Defender by command line

Discus and support Scanning for viruses with Windows Defender by command line in AntiVirus, Firewalls and System Security to solve the problem; Hi! I know that Windows Defender allows to scan for viruses by command line. I'm using it not for simple problem - after scan (?) it closes console... Discussion in 'AntiVirus, Firewalls and System Security' started by MIRKOSOFT, Mar 24, 2018.

  1. MIRKOSOFT Win User

    Scanning for viruses with Windows Defender by command line


    Hi!

    I know that Windows Defender allows to scan for viruses by command line.
    I'm using it not for simple problem - after scan (?) it closes console and I see result not.
    I'm using this command:

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

    How to leave console opened with visible result?

    Thank you for help.
    Miro

    :)
     
    MIRKOSOFT, Mar 24, 2018
    #1
  2. BJ 368 Win User

    After I upgraded to Win 10, I had duplicate files in the docx format and they seem to have an added extension for example FILE NAME -F708CP05

    I scanned the computer using Windows Defender, AVG and Kaspersky and found no viruses.

    If there is a Windows Defender off line for Win 10, give me the kink and I will try that.

    What's next?
     
    BJ 368, Mar 24, 2018
    #2
  3. Why I cannot clear Windows Defender scan history?

    I have tried to copy some files from a DVD to a USB flash drive. I have found that Windows Defender had identified some viruses in the DVD. I had done the recommended options, i.e., to delete the virus when other files were being copied into the drive.
    Then, I removed both the DVD and the flash drive (please note that the infected files in the DVD were unable to be copied to the flash drive). When I entered the scan history, I found that two high risk viruses history was there, and I was unable to delete
    their database from the history. I thought that Windows Defender might not be fully able to resolve the threat. I made a quick scan, a custom scan, a full scan, a Windows Defender offline scan, system files scan using command prompt; and found that everything
    was fine. There were no viruses found in the PC. Then, why I cannot delete these high risk viruses database from the scan history? Please help.
     
    Kaushik Nag, Mar 24, 2018
    #3
  4. sml156 Win User

    Scanning for viruses with Windows Defender by command line

    Open the command prompt and paste the command in it should stay open, If you start it with the run command it will close.

    To paste the command into the terminal:

    Open the command prompt with admin rights

    copy the command to the clipboard

    Paste the command with the right click of the mouse

    EDIT:
    Your command does not work

    Code: C:\WINDOWS\system32>"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "%1" CmdTool: Failed with hr = 0x80070002. Check C:\Users\Owner\AppData\Local\Temp\MpCmdRun.log for more information[/quote] Note:
    If you press the left mouse key in the terminal you will erase the clipboard contents.
     
    sml156, Mar 24, 2018
    #4
  5. MIRKOSOFT Win User
    So, this way it works not? I'm admin and owner of Program Files and Program Files (x86) folders - for problems I changed ownership.

    But you're talking about using it manually.

    I'm using it in menu of XYplorer and context menu (context menu of XYplorer allows to use only 32-bit menu and there is not included WD scan).
    XYplorer is perfect File Explorer replacement but new version has problem with 64-bit contexxt menu...

    Miro
     
    MIRKOSOFT, Mar 24, 2018
    #5
  6. sml156 Win User
    sml156, Mar 24, 2018
    #6
  7. MIRKOSOFT Win User
    Thank you, so I do update and will see.

    Miro
     
    MIRKOSOFT, Apr 5, 2018
    #7
Thema:

Scanning for viruses with Windows Defender by command line

Loading...
  1. Scanning for viruses with Windows Defender by command line - Similar Threads - Scanning viruses Defender

  2. Lost the function of the Virus scanning in Windows Defender

    in AntiVirus, Firewalls and System Security
    Lost the function of the Virus scanning in Windows Defender: I just install Microsoft Office 365 under my university account. Apparently, after I installed the Microsoft Office, the virus scanning function in Windows Defender just seem magically disappear since I cannot found that function anymore. Also, every time I tried to figure...
  3. Scan laptop viruses from prompt command

    in AntiVirus, Firewalls and System Security
    Scan laptop viruses from prompt command: Hello,I called on the Microsoft community to ask for an opinion in order to give me a script or a command prompt scan for laptop viruses. I mention that I have two partitions on the laptop as follows:-partition C with 256 GB operating system- partition D with 1000 GB...
  4. How to scan anti-virus with windows Defender?

    in AntiVirus, Firewalls and System Security
    How to scan anti-virus with windows Defender?: For windows 10, I would like to know on how to scan anti-virus with windows Defender, when I select a file and right click, there is no anti-virus for scanning for windows defender and how to make windows defender update automatically? Does anyone have any suggestions?...
  5. Defender virus scan

    in AntiVirus, Firewalls and System Security
    Defender virus scan: When I try to scan in Windows Defender, I get a notice in red: "Your Virus & threat protection is managed by your organization." What does this mean? https://answers.microsoft.com/en-us/windows/forum/all/defender-virus-scan/91a276bf-4e55-434a-81f5-6a85212ee6d7"
  6. Windows defender opening in command line popping on screen

    in Windows 10 Customization
    Windows defender opening in command line popping on screen: [ATTACH]This keeps popping on my screen ofter and disappears after few seconds. How could i get rid of it. I have HP laptop model 17 ca0011nr...
  7. defender virus scanning not work why?

    in AntiVirus, Firewalls and System Security
    defender virus scanning not work why?: defender virus scanning not work why? https://answers.microsoft.com/en-us/protect/forum/all/defender-virus-scanning-not-work-why/1e1e885f-ff9e-4e5c-b7a9-e5eeb0c3cae8
  8. Command line to turn on Periodic scanning

    in AntiVirus, Firewalls and System Security
    Command line to turn on Periodic scanning: Hi, I was able to turn on Windows Defender Periodic Scanning on with a command in Windows 10 1803. Command worked in 1803: C:\Windows\System32\SystemSettingsAdminFlows.exe Defender SideBySideOn Now I am installing Windows 10 1809 and the command does not work anymore....
  9. Windows Defender Off-Line Scan

    in AntiVirus, Firewalls and System Security
    Windows Defender Off-Line Scan: I am using Windows 10. When I run the Windows Defender off-line scan, it scanned the computer but did not give me a report. Would that mean nothing is found? What happens when the scan finds something? Is there a log file somewhere? Thanks Cent....
  10. Windows Command-Line: The Evolution of the Windows Command-Line

    in Windows 10 News
    Windows Command-Line: The Evolution of the Windows Command-Line: Welcome to the second post in this "Windows Command-Line" series. In this post we'll discuss some of the background & history behind the Windows Command-Line. Specifically, we’ll explore its humble origins in MS-DOS, to its modern-day incarnation supporting tools like...