Add Defender Exclusion
Adds one or more exclusions to Microsoft Defender Antivirus. Exclusions that are already configured are left untouched, so the brick can be run again without creating duplicates.
Parameters
Section titled “Parameters”Exclusion Type
Section titled “Exclusion Type”Required — Default: Path
Select what kind of exclusion to add.\n\nPath: a folder or a file that Defender should not scan.\n\nProcess: a program, so files that this program opens are not scanned.\n\nExtension: a file type, so every file with that extension is skipped no matter where it is stored.\n\nExclusions reduce protection, so keep them as narrow as possible. Allowed values: Path, Process, Extension.
Exclusion Value
Section titled “Exclusion Value”Required
The values to exclude. Add one entry for each value. A single entry may also hold a comma or semicolon separated list, so a list that is pasted in one go still works. Spaces around a value and empty entries are ignored, which means a value may contain spaces but not a comma or a semicolon.\n\nExamples for Path:\nC:\Program Files\MyApp\nC:\Temp\MyApp\cache.dat\n\nExamples for Process:\nMyApp.exe\nC:\Program Files\MyApp\MyApp.exe\n\nExamples for Extension:\nlog\n.tmp\n\nThe value must match the selected exclusion type. A file extension must be the extension only, with or without a leading dot.
Continue If Defender Is Not Present
Section titled “Continue If Defender Is Not Present”Required — Default: True
Enable to let the brick finish without an error on machines where Microsoft Defender Antivirus is missing or replaced by another antivirus product. Disable to make the brick fail on those machines instead. Keep this enabled when the same package is deployed to machines running a third party antivirus.
Details
Section titled “Details”- Category: System
- Brick ID:
Defender-Exclusion-Add
{ "category": "system", "description": "Adds one or more exclusions to Microsoft Defender Antivirus. Exclusions that are already configured are left untouched, so the brick can be run again without creating duplicates.", "developerVendor": "CapaSystems A/S", "displayName": null, "id": "Defender-Exclusion-Add", "name": "Add Defender Exclusion", "parameters": [ { "allowManualInput": false, "defaultValue": null, "defaultValueObject": { "id": "Path", "name": "Path" }, "description": "Select what kind of exclusion to add.\\n\\nPath: a folder or a file that Defender should not scan.\\n\\nProcess: a program, so files that this program opens are not scanned.\\n\\nExtension: a file type, so every file with that extension is skipped no matter where it is stored.\\n\\nExclusions reduce protection, so keep them as narrow as possible.", "id": "ExclusionType", "name": "Exclusion Type", "regExValidation": "", "required": true, "type": "ComboBox", "value": null, "values": [], "valuesObject": [ { "id": "Path", "name": "Path" }, { "id": "Process", "name": "Process" }, { "id": "Extension", "name": "Extension" } ] }, { "allowManualInput": true, "defaultValue": null, "defaultValueObject": { "id": "", "name": "" }, "description": "The values to exclude. Add one entry for each value. A single entry may also hold a comma or semicolon separated list, so a list that is pasted in one go still works. Spaces around a value and empty entries are ignored, which means a value may contain spaces but not a comma or a semicolon.\\n\\nExamples for Path:\\nC:\\Program Files\\MyApp\\nC:\\Temp\\MyApp\\cache.dat\\n\\nExamples for Process:\\nMyApp.exe\\nC:\\Program Files\\MyApp\\MyApp.exe\\n\\nExamples for Extension:\\nlog\\n.tmp\\n\\nThe value must match the selected exclusion type. A file extension must be the extension only, with or without a leading dot.", "id": "ExclusionValue", "name": "Exclusion Value", "regExValidation": "", "required": true, "type": "MultiSelectComboBox", "value": null, "values": [], "valuesObject": [] }, { "allowManualInput": false, "defaultValue": "True", "defaultValueObject": null, "description": "Enable to let the brick finish without an error on machines where Microsoft Defender Antivirus is missing or replaced by another antivirus product. Disable to make the brick fail on those machines instead. Keep this enabled when the same package is deployed to machines running a third party antivirus.", "id": "ContinueIfDefenderNotPresent", "name": "Continue If Defender Is Not Present", "regExValidation": "", "required": true, "type": "Boolean", "value": null, "values": [], "valuesObject": null } ], "powershell": { "base64Encoded": true, "function": "ZnVuY3Rpb2..." }, "type": "powerbrick", "version": "2026.10.8.1"}