FIX: An Unexpected Problem Occurred in Windows Defender

We have solutions that worked for everyone

Reading time icon 5 min. read


Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

  • Windows Defender is the first line of defense against viruses and malware, but many users get Unexpected errors, leaving their PC vulnerable to threats.
  • Switching to more robust antivirus software is a quick way to deal with the problem.
  • You can try checking for corrupt system files, modifying the Registry, or performing an in-place upgrade, amongst other solutions.
fix windows defender unexpected error in Windows
ESET Antivirus comes with all the security tools that you may ever need to protect your data and privacy, including:
  • Anti-theft support
  • Banking-level encryption
  • Advanced digital threat protection

More and more Windows Defender users are reporting they can’t turn on Microsoft’s built-in antivirus program due to various errors, the most common being the Unexpected error. Sorry, we ran into a problem. Please try again

The error could be due to several reasons, and the long list of solutions can confuse many. But there are a few tried and tested ones that seem to work for most users, and we will be exploring these today.

Before we proceed, here are a few similar errors, the solutions here will fix:

  • Windows Defender security center not working – If Windows Defender is not working, the problem might be with the services. So be sure to restart them and check if that helps.
  • Windows Defender unexpected error please try again – This is another common problem that can occur in Windows 10.
  • Windows Defender keeps stopping – Many users reported that Windows Defender keeps stopping on their PC. If you encounter this problem, check for issues with the Registry.

Quick Tip:

Windows Defender is not the best security tool out there. There are many safer bets for you, that include lots of other features and extra layers of protection.

We suggest switching to specialized antivirus software. You should look for one that uses advanced AI and machine learning to detect even the newest threats out there.

ESET Internet Security

This is the ultimate protection software that will keep your sensitive data, and important files private and safe.
Check price Visit website

How do I know if a Microsoft security alert is real?

It’s actually quite simple and quick, given you know the ways to identify one. The appearance often helps verify if a security alert is fake. The ones from Microsoft will be well-designed, have no typos, and will have the option to ignore/close the prompt.

Secondly, the place where the security alert appears is another critical factor. Microsoft wouldn’t send alerts while you are on a browser or other third-party apps. Besides, Microsoft wouldn’t ask you to contact an email address or a number.

How can I fix the Windows Defender unexpected error?

Before we head to the slightly complex solutions, here are a few quick ones to get things up and running:

  • Restart the computer.
  • Check for updates and install if any are available. There was a bug in Windows that Microsoft addressed and released a patch for it. So, updating should fix the problem in your case, as it did for other users.
  • Remove any third-party antivirus installed on the computer to fix the Virus and threat protection unexpected error.

If none of these work, head to the solutions listed next.

1. Use antivirus-specific removal tools

Completely uninstall your old antivirus programs using this antivirus removal tool. There should be one on the software’s website. Then restart your computer, and Windows Defender should be able to install the latest updates and get things running.

In addition to antivirus removal tools, you can also use uninstaller tools for this job.

If you’re not familiar, uninstaller apps are specially designed to uninstall any program and remove all its files and registry entries from your PC. Therefore, we suggest you opt for the best uninstaller software on Windows.

2. Run an SFC scan

  1. Type Command Prompt in the Search bar, and click on Run as administrator.command prompt
  2. Click Yes in the UAC prompt.
  3. Now, paste the following command and hit Enter: sfc /scannowsfc scan to fix windows defender unexpected error

Corrupt system files are a common reason behind the Unexpected error in Windows Defender, and a simple SFC (System File Checker) scan should fix things.

3. Reset Windows Security

  1. Press Windows + R to open Run, type powershell, and then press Ctrl + Shift + Enter.powershell
  2. Click Yes in the UAC prompt.
  3. Paste the following command and hit Enter to execute it: Add-AppxPackage -Register -DisableDevelopmentMode "C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\AppXManifest.xml"command to fix windows defender unexpected error

4. Modify the Registry

  1. Press Windows + R to open Run, type regedit, and then click OK.regedit
  2. Click Yes in the UAC prompt.
  3. Now, paste the following path in the address bar and hit Enter: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defenderpath
  4. Locate the DisableAntiSpyware or DisableAntivirus on the right and double-click on it. If you can’t find one, right-click on the blank portion, hover the cursor over New, select DWORD (32-bit) Value, and then name it as DisableAntiSpyware.dword (32-bit) Value
  5. Next, enter 0 under Value data and click on OK.0 to fix windows defender unexpected error

This method has helped several users fix things when the Windows Security Unexpected error showed up. But make sure to be extra cautious and not make any changes other than the ones described here.

5. Perform an in-place upgrade

  1. Go to Microsoft’s official website, and click on the Download tool now button under Create Windows 10 installation media.download tool now
  2. Once downloaded, launch the setup, and wait for it to get things ready.run tool
  3. Now, click on Accept to agree to the license terms and conditions.accept
  4. Choose Upgrade this PC, and click on Next.upgrade this PC now to fix windows defender unexpected error
  5. Now, wait for the download the complete and follow the on-screen instructions to complete the process.downloading

An in-place upgrade fixes a wide range of issues, including the Windows Defender Unexpected error. Though it will take some time, things should run smoothly after completion.

Also, the solutions here would work in case of the Exploit Protection Unexpected error in Windows.

If you’re looking to upgrade the PC’s defense system, take a closer look at this list of the best antivirus software with lifetime licenses and choose the one that best suits your requirements.

Tell us which fix worked for you in the comments section below.

More about the topics: Windows Defender issues