1

If I want some kind of script to add an exclusion to Windows file defender, I can do something along these lines by saving the following text as a .bat file and running it:

powershell -inputformat none -outputformat none -NonInteractive -Command Add-MpPreference -ExclusionPath "mypath"

But what if I want to add, specifically, a registry entry exception to Windows defender in a similar manner, how would I acheive that? Is it even possible to add a registry entry as an exception to Windows defender?

2

Not really an answer, but I do it through the registry here is the info:

File and folder exclusions are stored in the registry key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths

File type exclusions are stored in the registry key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Extensions

Process exclusions are stored in the registry key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes

Sincerely,

Alvaro Lamadrid

  • 1
    That's actually a better solution than the old method that I was using, but take a look here: i.imgur.com/tkxBCxv.png Notice how one of the items is a "regkey" as opposed to a "file." How would I add that regkey as an exclusion using your method? – ereHsaWyhsipS Jun 7 '18 at 0:54
  • Can you add registry exclusions? It looks like even throught the GUI you can only add File, File Type, Folder, or Process exceptions. – EBGreen Jun 7 '18 at 12:40
  • Here is Microsoft official documentation of the different ways IT Professionals have to manage exclusions in Windows Defender. docs.microsoft.com/en-us/windows/security/threat-protection/… – Alvaro Lamadrid Jun 7 '18 at 13:52
  • So it looks like no you cannot have registry exclusions. – EBGreen Jun 7 '18 at 14:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.