Skip to content

Remove Defender Exclusion

Removes one or more Microsoft Defender Antivirus exclusions of the selected type. Use this to clean up folder, file, process or file extension exclusions that are no longer needed, for example when an application is uninstalled. Only exclusions that are actually configured are removed, so the brick can safely run more than once.

Required — Default: Path

Select the kind of exclusion you want to remove.\n• Path - a folder or file that is excluded from scanning\n• Process - a program whose file activity is excluded from scanning\n• Extension - a file extension that is excluded from scanning\n\nAll values entered below must be of the selected kind. Add one brick per kind if you need to remove more than one kind. Allowed values: Path, Process, Extension.

Required

The exclusion values to remove. 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 are ignored, and so are empty entries.\n\nExample for Path:\nC:\Program Files\MyApp\nC:\Temp\MyApp\MyFile.log\n\nExample for Process:\nMyApp.exe\nMyOtherApp.exe\n\nExample for Extension:\nlog\ntmp\n\nA value that is not currently excluded is reported in the log and, depending on the setting below, either skipped or treated as a failure.

Optional — Default: True

Enable to continue without an error when an exclusion is not configured on the device. This is recommended, so an uninstall workflow still succeeds when the exclusion has already been removed.\n\nDisable to fail the step when one or more of the specified exclusions could not be found.

Optional — Default: True

Enable to continue without an error when Microsoft Defender Antivirus is not available on the device, for example when it has been replaced by another antivirus product. This is recommended for workflows that run on a mixed set of devices.\n\nDisable to fail the step when Microsoft Defender Antivirus cannot be reached.

  • Category: System
  • Brick ID: Defender-Exclusion-Remove