Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Exclusions · Microsoft Defender

Direct answer

Defender exclusions skip scanning of specific files, folders, extensions or processes to avoid conflicts or performance issues. Keep them minimal and specific, because attackers abuse excluded paths.

When to use this

Use this when reviewing or adding Defender exclusions.

First 30 seconds

1. List: Get-MpPreference | Select Exclusion*.

2. Each exclusion justified and narrow (no broad folders like C:\Temp).

3. Policy-managed exclusions.

4. Remove unneeded: Remove-MpPreference.

5. Review regularly.

Operational verification

exclusions skip scanning → risk

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Excluding whole drives or C:\Users.
  • Excluding folders writable by standard users (attackers drop malware there).
  • Process exclusions for powershell.exe or other LOLBins.
  • Exclusions added locally and forgotten — attackers check them with Get-MpPreference; hide them with HideExclusionsFromLocalAdmins.
Platform / version applicability
Windows security
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows security
Key commandGet-MpPreference | Select -ExpandProperty ExclusionPath
Scope / prerequisiteUse this when reviewing or adding Defender exclusions.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Keep exclusions as few and narrow as possible.
  • Attackers place tools in excluded paths.
  • Process exclusions skip everything that process touches.
Key checks
  • Get-MpComputerStatus — Defender state and signature age
  • Get-MpPreference — configuration incl. exclusions
  • Get-MpThreat / Get-MpThreatDetection — threats and detections
  • Update-MpSignature — update signatures
  • Start-MpScan -ScanType QuickScan — run a scan
ReferenceWhy it matters1 section · depth on demand

Managing exclusions

Get-MpPreference | Select ExclusionPath,ExclusionExtension,ExclusionProcess
Add-MpPreference -ExclusionPath "D:\SQLData\*.mdf"
Remove-MpPreference -ExclusionPath "C:\Temp"

Documented example, not captured output. Keep exclusions minimal and documented (vendor-recommended paths for SQL, Exchange, Hyper-V). Never exclude C:\Temp, user profiles or whole drives — attackers check for exclusions and drop malware there. Hide exclusions from local admins via policy.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Defender exclusions reduce scanning overhead but create blind spots attackers use.

Get-MpPreference | Select -Expand ExclusionPath
Add-MpPreference -ExclusionPath 'D:\SQLData\*.mdf','D:\SQLLogs\*.ldf'
Add-MpPreference -ExclusionProcess 'sqlservr.exe'
Remove-MpPreference -ExclusionPath 'C:\Temp'

Rules: follow vendor-published exclusion lists (SQL Server, Exchange, Hyper-V, backup agents), exclude specific files/extensions rather than whole drives, never exclude user-writable folders like Downloads or Temp, and review exclusions regularly. Hide exclusions from local users (HideExclusionsFromLocalUsers).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

Commands

Get-MpPreference | Select -ExpandProperty ExclusionPath
Add-MpPreference -ExclusionPath 'D:\SQLData\*.mdf'
Remove-MpPreference -ExclusionPath 'C:\Temp'

Documented example, not captured output. Prefer vendor-recommended exclusions (SQL, Exchange, Hyper-V) and file-type or process-specific exclusions over broad folder exclusions.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows security current

Authoritative/upstream documentation reviewed for bounded claims in Microsoft Defender → Exclusions. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/defender/ · confidence 94%
Confirmation

Confirm action

Continue?