Microsoft

To Add or Remove File Exclusion for Microsoft Defender Antivirus in PowerShell

2021年7月5日

1 Open an elevated PowerShell.

2 Type the command you want to use below into the elevated PowerShell, and press Enter. (see screenshots below)
(Add file exclusion)
Add-MpPreference -ExclusionPath "<Full path of file>" -Force

OR

(Remove file exclusion)
Remove-MpPreference -ExclusionPath "<Full path of file>" -Force

Substitute <Full path of file> in the commands above with the actual full path of the file (ex: “C:\Windows\notepad.exe”) you want to add or remove as an exclusion.
3 You can now close the elevated PowerShell if you like.

Original author:

https://www.tenforums.com/tutorials/5924-add-remove-microsoft-defender-antivirus-exclusions-windows-10-a.html#option4

You Might Also Like

No Comments

Leave a Reply

%d 博主赞过: