Use this when reviewing or adding Defender exclusions.
Exclusions · Microsoft Defender
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.
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.
exclusions skip scanning → risk
Context & applicabilityCommon mistakes · platform/version boundaries
- Excluding whole drives or
C:\Users. - Excluding folders writable by standard users (attackers drop malware there).
- Process exclusions for
powershell.exeor other LOLBins. - Exclusions added locally and forgotten — attackers check them with
Get-MpPreference; hide them withHideExclusionsFromLocalAdmins.
Operational reference
Fast context before you go deeper.
Get-MpPreference | Select -ExpandProperty ExclusionPathEvidence · 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.
- Keep exclusions as few and narrow as possible.
- Attackers place tools in excluded paths.
- Process exclusions skip everything that process touches.
Get-MpComputerStatus— Defender state and signature ageGet-MpPreference— configuration incl. exclusionsGet-MpThreat / Get-MpThreatDetection— threats and detectionsUpdate-MpSignature— update signaturesStart-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).
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%