Windows 11 Defender Exclusion Does Not Save: Fix
🔍 WiseChecker

Windows 11 Defender Exclusion Does Not Save: Fix

You add a file, folder, or process to the Microsoft Defender Antivirus exclusion list in Windows 11. You click OK, reopen the settings, and the entry is gone. This problem prevents critical applications, development tools, or network shares from running without interference from real-time scanning. The root cause is often a corrupted policy setting, a group policy override, or a permissions conflict with the Windows Security app. This article explains why exclusions fail to persist and provides three reliable methods to fix the issue.

Key Takeaways: Fixing Defender Exclusion Not Saving on Windows 11

  • Windows Security > Virus & threat protection > Manage settings > Exclusions: The primary UI where exclusions are added and removed
  • Group Policy Editor (gpedit.msc) > Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Exclusions: Overrides local exclusions if configured
  • PowerShell (Set-MpPreference -ExclusionPath): Directly writes exclusions to the registry, bypassing UI corruption

ADVERTISEMENT

Why Windows 11 Defender Exclusions Disappear After Saving

The Microsoft Defender Antivirus exclusion list is stored in the registry under HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions. When you use the Windows Security app, it writes to this location. However, the app can fail to commit changes due to a corrupted app database, a conflicting Group Policy setting, or insufficient permissions on the registry key. In enterprise environments, IT administrators often use Group Policy to enforce a standard exclusion list. If a local policy or a registry permission prevents write access, the app shows the exclusion as saved but reverts the change on next open. Another common cause is a third-party antivirus that hooks into the Windows Security interface and blocks modifications.

Methods to Fix Defender Exclusion Not Saving on Windows 11

Method 1: Clear the Windows Security App Cache and Reset the App

A corrupted app cache prevents the Windows Security app from writing exclusions. Resetting the app clears the cache and restores default behavior.

  1. Open Windows Settings
    Press Win + I to open Settings. Go to Apps > Installed apps.
  2. Find Windows Security
    Scroll to Windows Security in the list. Click the three-dot menu next to it and select Advanced options.
  3. Reset the App
    Scroll down to the Reset section. Click Reset and confirm when prompted. Wait for the process to finish.
  4. Restart and Add Exclusion Again
    Restart your PC. Open Windows Security, go to Virus & threat protection > Manage settings > Exclusions, and add your exclusion.

Method 2: Add Exclusions Using PowerShell

PowerShell writes exclusions directly to the registry and bypasses the Windows Security app entirely. This method works when the app UI is corrupted or blocked.

  1. Open PowerShell as Administrator
    Press Win + X and select Windows Terminal (Admin). If prompted by User Account Control, click Yes.
  2. Add a File or Folder Exclusion
    Run the following command, replacing C:\Path\To\Your\Folder with your actual path:
    Add-MpPreference -ExclusionPath "C:\Path\To\Your\Folder"
    Press Enter. Repeat for each path you need.
  3. Add a Process Exclusion
    To exclude a process by its executable name, run:
    Add-MpPreference -ExclusionProcess "notepad.exe"
    Replace notepad.exe with your process name.
  4. Add an Extension Exclusion
    To exclude all files with a specific extension, run:
    Add-MpPreference -ExclusionExtension ".tmp"
    Replace .tmp with your extension.
  5. Verify the Exclusions Were Added
    Run Get-MpPreference and check the ExclusionPath, ExclusionProcess, and ExclusionExtension properties. The paths you added should appear.

Method 3: Check and Remove Group Policy Overrides

If your PC is part of a domain or has local Group Policies configured, those policies can override manual exclusion settings. You must check the local Group Policy Editor for conflicting entries.

  1. Open Local Group Policy Editor
    Press Win + R, type gpedit.msc, and press Enter. If you are on Windows 11 Home, you must enable gpedit first or use the Registry Editor method below.
  2. Navigate to Defender Exclusions Policy
    Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus > Exclusions.
  3. Check Each Exclusion Policy
    Double-click Path Exclusions. If it is set to Enabled, any paths listed here override local exclusions. To remove the override, set it to Not Configured and click OK. Repeat for File Extension Exclusions and Process Exclusions.
  4. Apply the Changes
    Close the Group Policy Editor. Open a Command Prompt as administrator and run gpupdate /force to apply the policy changes immediately.
  5. Add Exclusion Again
    Now use Windows Security or PowerShell to add your exclusion. It should persist.

Method 4: Use Registry Editor to Add Exclusions Directly

If Group Policy Editor is not available, you can write exclusions directly to the registry. This method bypasses both the app and group policy.

  1. Open Registry Editor
    Press Win + R, type regedit, and press Enter. Click Yes when prompted by User Account Control.
  2. Navigate to the Exclusions Key
    Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions.
  3. Add a Path Exclusion
    Right-click the Exclusions key, select New > Key, and name it Paths if it does not already exist. Right-click the Paths key, select New > String Value, and name it with a descriptive label like MyApp. Double-click the new value, set Value data to the full path (e.g., C:\MyApp), and click OK.
  4. Add an Extension Exclusion
    Right-click the Exclusions key, select New > Key, and name it Extensions if it does not exist. Add a new String Value under Extensions with the name .tmp and leave the value data blank. Repeat for each extension.
  5. Add a Process Exclusion
    Right-click the Exclusions key, select New > Key, and name it Processes if it does not exist. Add a new String Value under Processes with the name notepad.exe and leave the value data blank.
  6. Restart Windows Security
    Close Registry Editor. Open Task Manager (Ctrl + Shift + Esc), find Windows Security in the list, right-click it, and select End task. Windows Security restarts automatically.
  7. Verify Exclusions
    Open Windows Security and check the exclusions list. The entries you added via Registry Editor should now appear.

ADVERTISEMENT

Common Issues When Defender Exclusions Do Not Save

Exclusions Disappear After Windows Update

A Windows Update can reset the Windows Security app database. After a major update, open Windows Security and check the exclusions list. If entries are missing, re-add them using PowerShell or Registry Editor, which are less likely to be affected by updates.

Third-Party Antivirus Blocks Exclusions

Some third-party antivirus programs disable Windows Defender and replace it with their own protection. In such cases, the Windows Security app may not save exclusions because Defender is inactive. Uninstall the third-party antivirus, restart, and then add exclusions through Windows Security. If you need the third-party software, configure exclusions within its own interface instead.

User Account Control Blocks Write Access

Even when you are an administrator, Windows Security may run with reduced privileges. Always open Windows Security by right-clicking the Start button and selecting Run as administrator. Alternatively, use PowerShell or Registry Editor, which require explicit administrator elevation.

Corrupted User Profile Prevents Saving

A corrupted user profile can cause the Windows Security app to fail when writing settings. Create a new local user account, sign in to that account, and try adding exclusions. If the exclusions save successfully, migrate your data to the new account and delete the old one.

Windows Security App vs PowerShell vs Registry Editor for Adding Exclusions

Item Windows Security App PowerShell Registry Editor
Ease of Use Graphical, intuitive Command-line, requires syntax knowledge Manual navigation, risk of errors
Persistence of Changes Can fail due to UI corruption Writes directly to registry, highly reliable Direct registry write, most reliable
Bypasses Group Policy No, blocked by policy Yes, unless policy is enforced Yes, unless policy is enforced
Requires Admin Rights Yes Yes Yes
Best For Quick one-time exclusions Bulk additions and scripting When UI and PowerShell fail

After applying one of the methods above, you can now add and save exclusions in Windows 11 Defender without them disappearing. Test the exclusion by running the file or process that was previously blocked. If you manage multiple PCs, consider deploying exclusions via Group Policy or PowerShell scripts to avoid manual entry errors. For advanced protection, review the Windows Defender event logs under Applications and Services Logs > Microsoft > Windows > Windows Defender > Operational to see why exclusions were removed in the past.

ADVERTISEMENT