{"id":47041,"date":"2023-05-19T17:16:03","date_gmt":"2023-05-19T11:46:03","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=47041"},"modified":"2023-08-07T13:48:19","modified_gmt":"2023-08-07T08:18:19","slug":"cant-delete-defender-exclusions","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/cant-delete-defender-exclusions\/","title":{"rendered":"Fix: Cannot Delete Microsoft Defender Exclusions"},"content":{"rendered":"<p>When you open Windows Security \u2192 Virus and Threat Protection\u00a0 \u2192 Manage Settings \u2192 Add or remove exclusions, you may be able to delete the exclusions by clicking on the &#8220;Remove&#8221; button.<\/p>\n<p>Also, the <code>Remove-MpPreference<\/code> PowerShell command may not help.<!--more--><\/p>\n<div class=\"rp\"><strong>RELATED:<\/strong> <a href=\"https:\/\/www.winhelponline.com\/blog\/reset-exclusions-windows-defender\/\">How to Bulk Reset Exclusions in Windows Defender<\/a><\/div>\n<h2>Cause<\/h2>\n<p>The exclusion may have been added as a policy setting. The policy setting needs to be removed using the Registry Editor or the Group Policy Editor.<\/p>\n<h2>Resolution<\/h2>\n<p>To remove the exclusions (policy), follow one of these methods:<\/p>\n<h3>Option 1: Remove Microsoft Defender Policies<\/h3>\n<ol>\n<li>Download <a href=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/01\/defender-policies-remove.zip\">defender-policies-remove.reg<\/a> (zipped).<\/li>\n<li>Unzip and run the enclosed REG file.\u00a0After running it, you may want to open the Registry Editor to ensure the \u201cWindows Defender\u201d Policies key doesn\u2019t exist.<\/li>\n<li>Once done, restart Windows for the changes to take effect.<\/li>\n<\/ol>\n<p>If you\u2019re unable to apply the above registry file, launch Windows in <a href=\"https:\/\/www.winhelponline.com\/blog\/start-windows-11-or-10-safe-mode\/\">Safe Mode<\/a>\u00a0and try merging the file again.<\/p>\n<p>This removes all the Defender-related policies from the registry.<\/p>\n<p><em>(For more information, see the article <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-defender-disabled-real-time-protection-virus\/\">Microsoft Defender: \u201cManaged by your administrator\u201d or \u201cYour IT administrator has limited access\u201d<\/a><\/em>)<\/p>\n<hr \/>\n<h3>Option 2: Delete the &#8220;Exclusions&#8221; manually<\/h3>\n<ol>\n<li>Start Regedit.exe and go to the following key:\n<pre>HKEY_LOCAL_MACHINE\\SOFTWARE\\Policies\\Microsoft\\Windows Defender<\/pre>\n<\/li>\n<li>Expand the &#8220;Windows Defender&#8221; key.<\/li>\n<li>Right-click on the &#8220;Exclusions&#8221; subkey and choose Delete.<\/li>\n<li>Exit the Registry Editor.<\/li>\n<\/ol>\n<div class=\"qt\">\nTo accomplish the above using command-line, run the following command from admin Command Prompt:<\/p>\n<pre class=\"cmd\">reg delete \"HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Exclusions\" \/f<\/pre>\n<p>Press Enter.\n<\/p><\/div>\n<h4>Equivalent Group Policy setting<\/h4>\n<pre>Computer Configuration \u2192 Windows Components \u2192 Microsoft Defender Antivirus \u2192 Exclusions<\/pre>\n<p>Set &#8220;Extension Exclusions&#8221;, &#8220;Path Exclusions&#8221;, and &#8220;Process Exclusions&#8221; to Not configured.<\/p>\n<hr \/>\n<h3>Option 3: Delete the &#8220;Exclusions&#8221; via Windows RE<\/h3>\n<p>If the exclusions can&#8217;t be removed when Windows is running, you can boot into Windows RE and delete the exclusions.<\/p>\n<ol>\n<li>From the sign-in screen in Windows 10\/11, press and hold the <kbd>SHIFT<\/kbd> key on the keyboard.<\/li>\n<li>With the <kbd>SHIFT<\/kbd> key still pressed, click the Power button and then click Restart.<\/li>\n<li>In the Recovery Options menu, click Troubleshoot, and then click Advanced Options.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3098\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/05\/winre-1.png\" alt=\"windows recovery options\" width=\"600\" height=\"464\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/05\/winre%20(2).png\" width=\"600\" height=\"391\"><\/li>\n<li>Click Command Prompt.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/05\/winre%20(3).png\" width=\"600\" height=\"373\" class=\"alignnone size-medium\" \/><\/li>\n<li>Find out the drive letter of your Windows installation by typing <code>bcdedit<\/code>. If Windows was installed on C:\\ drive, it might be assigned D:\\ in Windows RE. The output of the <code><strong>bcdedit<\/strong><\/code> command shows the Windows drive letter, as seen from Windows RE.\n<div class=\"newline\"><em>Note: On my EFI-based system, the bcdedit output stated that the OS drive-letter is (<strong>E:\\<\/strong>)<\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/01\/bcdedit_find_windows_drive_letter_winre.png\" alt=\"bcdedut find windows drive letter osdevice\" width=\"750\" height=\"619\" class=\"alignnone size-full wp-image-32042\" \/><\/p>\n<\/div>\n<\/li>\n<li>Once you got the drive letter of your Windows installation (e.g., <code><strong>E:\\<\/strong><\/code> ), run the following commands:\n<pre class=\"cmd\">REG LOAD HKLM\\S2 E:\\windows\\system32\\config\\SOFTWARE<\/pre>\n<pre class=\"cmd\">REG DELETE \"HKLM\\S2\\Microsoft\\Windows Defender\\Exclusions\" \/F<\/pre>\n<pre class=\"cmd\">REG UNLOAD HKLM\\S2<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/defender_-exclusions_delete.jpg\" alt=\"delete defender exclusions offline\" width=\"682\" height=\"257\" class=\"alignnone size-full wp-image-52541\" \/><\/p>\n<p><strong>Important:<\/strong> For each command, you should see the output &#8220;<strong>The operation completed successfully.<\/strong>&#8221;\n<\/li>\n<\/ol>\n<hr \/>\n<h3>Option 4: Install Malwarebytes and set it as the default AV provider (temporarily)<\/h3>\n<ol>\n<li>Install Malwarebytes from <code>https:\/\/www.malwarebytes.com\/<\/code> and run it.<\/li>\n<li>In the Malwarebytes Settings dialog, click &#8220;Security.&#8221;<\/li>\n<li>Enable &#8220;Always register Malwarebytes in the Windows Security Center&#8221; and wait 15 seconds or so. This turns off Defender real-time protection and sets Malwarebytes as the default antivirus provider.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/05\/malwarebytes-enable-security-center.png\" alt=\"malwarebytes register security center\" width=\"758\" height=\"234\" class=\"alignnone size-full wp-image-59427\" \/><\/li>\n<li>Download &#8220;AdvancedRun&#8221; from Nirsoft.net, and run it.<\/li>\n<li>From the AdvancedRun window, start <strong>C:\\Windows\\Regedit.exe<\/strong> as TrustedInstaller. See <a href=\"https:\/\/www.winhelponline.com\/blog\/run-program-as-trustedinstaller-locked-registry-keys-files\/#advancedrun\">this article<\/a> for more information.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/advancedrun-start-regedit.png\" alt=\"advancedrun start regedit.exe\" width=\"541\" height=\"285\" class=\"alignnone size-full wp-image-46172\" \/>\n<\/li>\n<li>From the Registry Editor window, delete the following key.\n<pre>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Defender\\Exclusions\\Paths<\/pre>\n<\/li>\n<li>Close Regedit.exe<\/li>\n<li>Disable &#8220;Always register Malwarebytes in the Windows Security Center.&#8221;<\/li>\n<li>Uninstall Malwarebytes (optional).<\/li>\n<\/ol>\n<p>That&#8217;s it! The Defender exclusions policies are now removed. Exit Windows RE and boot into Windows.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you open Windows Security \u2192 Virus and Threat Protection\u00a0 \u2192 Manage Settings \u2192 Add or remove exclusions, you may be able to delete the exclusions by clicking on the &#8220;Remove&#8221; button. Also, the Remove-MpPreference PowerShell command may not help.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,869],"tags":[441,661],"class_list":["post-47041","post","type-post","status-publish","format-standard","hentry","category-windows-10","category-windows-11","tag-registry","tag-windows-defender"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":59671,"url":"https:\/\/www.winhelponline.com\/blog\/reset-exclusions-windows-defender\/","url_meta":{"origin":47041,"position":0},"title":"How to Bulk Reset Exclusions in Windows Defender","author":"Ramesh","date":"July 24, 2023","format":false,"excerpt":"In the aftermath of a malware attack, you often end up with unwanted exclusion entries in Microsoft Defender Antivirus. Exclusions may exist for a folder, file, file type, or process. These exclusions can be cleared by opening the Virus and Threat Protection page in Windows Security. Select each entry and\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"powershell reset exclusions","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/defender-exclusions-clear-powershell.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/defender-exclusions-clear-powershell.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/defender-exclusions-clear-powershell.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/07\/defender-exclusions-clear-powershell.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5125,"url":"https:\/\/www.winhelponline.com\/blog\/windows-defender-disabled-real-time-protection-virus\/","url_meta":{"origin":47041,"position":1},"title":"Microsoft Defender: &#8220;Managed by your administrator&#8221; or &#8220;Your IT administrator has limited access&#8221;","author":"Ramesh","date":"January 23, 2017","format":false,"excerpt":"In the aftermath of a malware attack, the Windows Defender Security settings page may show the message Some settings are managed by your organization\u00a0or This setting is managed by your administrator. The real-time protection and cloud-based protection options may remain disabled or grayed out. Here is what the Windows Defender\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"Microsoft Defender Antivirus group policy settings","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/01\/windows-defender-gpedit-ui.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/01\/windows-defender-gpedit-ui.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/01\/windows-defender-gpedit-ui.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/01\/windows-defender-gpedit-ui.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":17887,"url":"https:\/\/www.winhelponline.com\/blog\/windows-defender-identifies-same-threat-repeatedly\/","url_meta":{"origin":47041,"position":2},"title":"Windows Defender Shows the Same Threat Repeatedly. How to Clear the Protection History","author":"Ramesh","date":"August 14, 2020","format":false,"excerpt":"On some Windows 10 and 11 computers, Microsoft Defender Antivirus may repeatedly warn about the same threat, although you've taken the necessary action (remediated) on that threat. When you click \"Start actions\" after choosing \"Remove\", nothing happens. Windows Defender would keep showing that non-existent threat. Cause This is caused by\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"detectionhistory folder contents","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/08\/defender-detection-history-delete.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/08\/defender-detection-history-delete.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/08\/defender-detection-history-delete.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/08\/defender-detection-history-delete.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":31386,"url":"https:\/\/www.winhelponline.com\/blog\/windows-update-services-deleted-every-restart\/","url_meta":{"origin":47041,"position":3},"title":"Windows Update services are deleted at every restart","author":"Ramesh","date":"December 30, 2022","format":false,"excerpt":"After you restore the missing Windows Update, BITS, or the Update Orchestrator Service services using registry files, you find that the services vanish again after a restart. They don't appear in the Services MMC. Cause This issue happens if your computer is infected. Malware running as a service or scheduled\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"autoruns check virus total","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/12\/autoruns-check-virustotal.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":54263,"url":"https:\/\/www.winhelponline.com\/blog\/windows-script-host-error-run-vbs\/","url_meta":{"origin":47041,"position":4},"title":"Windows Script Host error in AppData\\Local\\Updates\\Run.vbs. The System cannot find the file specified","author":"Ramesh","date":"June 17, 2023","format":false,"excerpt":"When you login to your account,\u00a0you may see a Windows Script Host error similar to the following: Windows Script Host Script: C:\\Users\\{username}\\AppData\\Local\\Updates\\Run.vbs Line: 31 Char: 1 Error: The system cannot find the file specified. Code: 80070002 Source: (null) Additionally, on some systems, you may see a WindowsService.exe popup window that\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"windowsservice.exe malware","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/windowsservice-exe-pop-up.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/windowsservice-exe-pop-up.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/windowsservice-exe-pop-up.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2023\/06\/windowsservice-exe-pop-up.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":17759,"url":"https:\/\/www.winhelponline.com\/blog\/windows-defender-hostsfilehijack-alert-telemetry-block\/","url_meta":{"origin":47041,"position":5},"title":"Windows Defender &#8220;HostsFileHijack&#8221; alert appears if Telemetry is blocked","author":"Ramesh","date":"August 5, 2020","format":false,"excerpt":"Since July last week, Windows Defender started issuing Win32\/HostsFileHijack \"potentially unwanted behavior\" alerts if you had blocked Microsoft's Telemetry servers using the HOSTS file. Out of the SettingsModifier:Win32\/HostsFileHijack cases reported online, the earliest one was reported at the Microsoft Answers forums where the user stated: I'm getting a serious \"potentially\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"defender hostsfilehijack","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/08\/defender-hostsfilejihack-00.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/47041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=47041"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/47041\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=47041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=47041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=47041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}