Forum Discussion

JLST's avatar
JLST
Copper Contributor
Nov 21, 2023

Defender exclude program from real-time scanning, but not scheduled

Hello, We are using MS Defender as our main AV, we have some in house applications that are having troubles with defender, each time we start the executable of our in-house program the real-time protection is scanning like crazy, this is resulting in a slow working state of our in-house program.
 
So we want to exclude our in-house program from the real-time scanning, but we still want to have scheduled scans in the folder where the in-house software is located, so we only want an exclusion for the real-time scanning for that particular software.
 
that even possible, we tried with GPO's and add exclusions, but it's also excluding from scheduled scans, but we only want to exclude from real-time scanning.
 
 
Image of GPO, but it's saying it also excluding scheduled scanning
Is 
  • LeonPavesic's avatar
    LeonPavesic
    Silver Contributor

    Hi JLST,

    Regrettably, there isn't a native method to exclude a file or directory from real-time scanning without affecting scheduled scanning. Nevertheless, a workaround has been proposed in a forum. You can employ the command line to manually trigger a scan for a specific folder, bypassing the exclusions. Use the following command:

     

    "C:\\Program Files\\Windows Defender\\MpCmdRun.exe" -scan -scantype 3 -File path-to-folder

     

    Replace "path-to-folder" with the actual path to the folder you wish to scan.
    This command will scan the designated folder, disregarding any exclusions.

    To simulate a scheduled scan, you could schedule this command to run at regular intervals. It's essential to note that while this workaround exists, it may not be the optimal solution.

    anti virus - Is there no way in Windows Defender to exclude a folder from realtime scanning but still include it for scheduled scanning? - Super User

    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic
    (LinkedIn)

Resources