To add file or folder exclusions to Windows Defender launch Windows Defender and click on Settings, scroll down to Exclusions and click on Add an Exclusion. You’ll be prompted by a number of options, select what or which location you want to exclude and hit OK.

If you want to remove an exclusion, simply click on that particular item and you should see a Remove button.