February 14th, 2016

PowerTip: Use PowerShell to add exclusion folder to Windows Defender

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to add an exclusion folder to Windows Defender.

Hey, Scripting Guy! Question How can I add the C:\temp folder to the exclusion list so it is not scanned by Windows Defender?

Hey, Scripting Guy! Answer Use the Add-MpPreference cmdlet and specify the exclusion path, for example:

Add-MpPreference -ExclusionPath “C:\Temp”

Note  You must run Windows PowerShell with elevated permissions when you execute this command or an error arises.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

1 comment

Discussion is closed. Login to edit/delete existing comments.

  • VARADHA RAJAN K

    thanks for the PowerShell commands