Windows Defender - Add exclusion folder programmatically

后端 未结 5 2113
醉梦人生
醉梦人生 2021-01-31 11:56

I was checking out different keyloggers for research purposes and stumbled upon Refog:

https://www.refog.com/keylogger/

This program could catch a lot of system

5条回答
  •  甜味超标
    2021-01-31 12:27

    The easiest way to do this is using PowerShell from CMD with elevated privileges (like balrob's answer), but you can also use the PowerShell environment variables to make your life easier; for example:

    powershell -inputformat none -outputformat none -NonInteractive -Command Add-MpPreference -ExclusionPath $ENV:USERPROFILE\Downloads
    

    which will add current user's Downloads folder, eg. C:\Users\Susana\Downloads.

    To get the list of environment variables provided by PowerShell, you can use this PowerShell command:

    Get-ChildItem Env: | Sort Name
    

    As you can see, there is the windir variable. They could use that in addition with the subfolders you mentioned.

提交回复
热议问题