How to Fix ‘Unexpected Error’ in Windows Defender?
Many Windows users have constantly been reporting that they have encountered the Unexpected error code when trying to use the Windows Defender. This error appears when they are going to the Virus & threat protection section with a message telling them that there are problems with the AV component. This error is typically encountered on Windows 10 and Windows 11.
We have decided to take an in-depth look into this problem since many people are going through it and don’t know how to solve it. Here is a shortlist that will help you understand what can cause this issue:
- 3rd party AV – One of the reasons could be the 3rd party antivirus that you are using. This is not applicable to all people because not everyone other another antivirus other than the Windows Defender. But for the ones that are using a 3rd party antivirus, it is worth trying to disable it to see if this will change something and fix the issue. If the disabling was successful, you should also delete the 3rd party AV to get rid of the future risk.
- System malware – Another cause for this issue could be some hidden malware that your computer is currently harboring. This is causing the Windows Defender to not work, as well as other problems similar to this one or different. But fortunately for you, to fix this you can either download and install the Microsoft Safety Scanner, or you can use the Microsoft Defender Offline scan
- Disabled Windows Firewall – This could be the principal case because some affected people have managed to find out that the Windows Defender and Windows Firewall have a connection that makes them work together. But if one of them is disabled, the other one won’t be able to work as well properly. So all you have to do is to make sure that your Windows Firewall is enabled.
- Outdated Windows – The users that have gone through this ‘Unknown error’ in Windows Defender are reporting that this issue could be also caused by your Windows being outdated. This means that you have missed an update or more and didn’t install them. If that is the case, you should be able to find all the uninstalled updates inside the Windows Update. Make sure to install the latest one.
Now that you are aware of all the possible causes for this error, here is a list of methods that will help you fix the Unknown error on Windows Defender, according to other affected users:
1. Disable any 3rd party antivirus (if applicable)
The first thing that you should do when you encounter this issue is to try to disable the 3rd party AV that you are currently using. This can be a helpful thing because the Unexpected error might be caused by the antivirus, which is not letting the
Therefore, if you are currently using an antivirus program other than Windows Defender, you should consider temporarily turning it off to determine if that is the root of the problem. If the issue is resolved after turning off the third-party AV, you can uninstall it as well to ensure that it won’t happen again.
Here is a guide with the step by step instructions on how to disable your 3rd party antivirus:
- You need to start by opening the hidden icons menu. To do this, click on the arrow located on the right side of the taskbar and the hidden icons will appear on your screen.
- Once you see all the hidden icons, you need to look for the antivirus that you are using. When you find it, right-click on it and make sure to disable the AV.
Note: If you are using a different 3rd party AV suite than the one in the picture, the steps to disable might be also different. In case you need help, look online for instructions.
- Now you can go to the Windows Defender to see if the Unknown error still appears.
- In case you don’t see the error and you are able to use the Windows Defender, the next thing you should do is to completely uninstall the 3rd party antivirus from your PC to not encounter the same error again.
- To do this, you need to open the Programs and Features menu. You can do this in many ways, but one of the easiest to do is to open a Run dialog box by pressing the Windows key + R, then type inside the search bar ‘appwiz.cpl‘ and press Enter.
- Now that you are inside the Programs and Features menu, look for the antivirus that was causing your problem through the list of apps.
- After you find the AV, you need to right-click on it and click on Uninstall to initialize the deleting process of the 3rd party antivirus
- All that’s left to do is follow the on-screen directions to finish the uninstalling procedure.
- After the process of uninstalling the 3rd party from your PC is complete, you can follow this article (here) to make sure that you delete all the files that are left inside your computer.
In case the ‘Unknown error’ in Windows Defender still appears after disabling the 3rd party antivirus, go to the second method below.
2. Change the value of the DisableAntiSpyware value in Regedit
A lot of people that have managed to get rid of this error are recommending the to try to change the value data of the DisableAntiSpyware value. You can use the Registry Editor to change to value data.
Authorized users can browse and modify the Windows registry using the Windows Registry Editor, a graphical application included with the Microsoft Windows operating system. Basically, you have access to every Windows, program, and driver value, as well as the ability to change them.
You can do this by opening the Registry Editor and going inside the Windows Defender folder, there you should be able to see the DisableAntiSpyware DWORD Value. In case you don’t see it, you can create it, but you must change the value data to 0 in order to make this method work.
Here is a guide that will show you exactly how to do this:
- The first thing you need to do is to open a Run dialog box. You can do this by pressing the Windows key + R, then typing ‘regedit‘ inside the search bar and pressing Enter to open the Registry Editor.
- You will be prompted by the User Account Control to confirm that you allow the app to make changes to your computer. To confirm this, you have to click on Yes.
- Once you are inside the Registry Editor, you have to access the Windows Defender folder. You can find it manually by searching in the correct folder, or you can insert the following command and you will be taken straight to the folder:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
- Now that you are inside the Windows Defender folder, you should be able to see the DisableAntiSpyware value. In case you don’t, right-click inside the folder and click on New, then click on DWORD (32-bit).
- Once the new value was created, rename it ‘DisableAntiSpyware‘.
- After that, double-click on the new value to open the edit menu. Now you have to make sure that the Value data is 0. When you are done, click on OK.
- When you are done with that, you can close the Registry Editor. Try to use the Windows Defender to see if the same issue still appears.
In case the Unknown error still appears in Windows Defender, go to the next method below.
3. Run a full system scan with Microsoft Safety Scanner
Another thing that you can try is to do a full scan of your system using the Microsoft Safety Scanner. This process might actually fix your problem according to the people that have used it.
The program called Microsoft Safety Scanner is made to discover and get rid of viruses on Windows systems. Simply download it, run a scan and look for malware to see if your system was affected by this. If there is malware found, that means the Windows Defender might not work because it was affected by this virus.
In case you don’t know how to do this, here are the steps you need to follow:
- The first thing you need to do is to download the Micrsoft Safety Scanner. You can do this from the official Microsoft site. Click the download button that corresponds with your system.
- Once the scanner is downloaded completely, open it and confirm to the User Account Control that you allow making changes to your PC.
- After that, follow the instructions to get to the other screen. then make sure to choose the Full scan of your computer. Then click on Next to continue.
Note: The scan will take some time depending on your PC, and could take up to some hours. - You will have to wait sometime until the scan is complete. After that, the malware will be eliminated if there are found.
- Once you are ready with that too, you should open the Windows Defender to see if your problem was fixed.
In case the Unknow error is still happening to your Windows Defender, go to the next method below.
4. Enable the Windows Firewall
It is worth trying to enable the Windows Firewall as well to see if this will fix your Windows Defender. Many affected users have confirmed that this method worked in their case.
The Windows Firewall might be disabled, and this can be causing the Windows Defender to not work properly, so it is recommended you check the status of the Windows Firewall.
All you have to do is to open the Control Panel and go to the System and Security section, where you will be able to select the Windows Firewall. There you will have to check and make sure that the Windows Firewall is enabled.
Here are the steps that will show you how to enable the Windows Firewall:
- You need to start by opening the Control Panel. One of the easiest ways to open it is to open a Run dialog by pressing the Windows key + R and typing inside the search bar ‘control‘, then pressing Enter.
- Once you are inside the Control Panel, click on the System and Security section.
- After that, you need to select the Windows Defender Firewall section.
- When you are inside the Windows Defender Firewall section, look on the left side menu until you see the Turn Windows Defender Firewall on or off option. Once you see it, click on it.
- After you have done that, make sure that both the private and public options are enabled. When you are completely sure, click on OK to save the changes and go back to the previous screen.
- Now you need to reboot your computer in case the Windows Defender Firewall was disabled and you enabled it. This is the only way that the changes will apply.
- After the computer boots back, open the Windows Defender to see if the error is still happening.
In case the Unknown error in Windows Defender is still present even after enabling the Windows Defender Firewall, go to try the next possible fix.
5. Run the Microsoft Defender Offline scan
Some other affected users have experienced this error and managed to fix it by running the Microsoft Defender Offline. This action is recommended to do if you are suspecting hidden malware on your computer but was also helpful for people that were trying to fix this Windows Defender error.
Microsoft Defender Offline is an effective offline scanning tool that is being used when people are going through malware problems.
To run the Microsoft Defender Offline scan, you have to go to the Virus & threat protection section inside the Windows Settings. There you will be able to select the Microsoft Defender Offline scan and start the process.
Here are the steps that you will need in order to do a Microsft Defender Offline scan:
- You should start by opening the Windows Defender. To do this, you have to press the Windows key + R and type ‘ms-settings:windowsdefender‘ inside the search bar, then press Enter and the Windows Defender will open on your screen.
- Once you are inside the Windows Defender, you should access the Virus & protection section.
- Now that you have been redirected to the Virus & threat protection section, right under Current threats is the Scan options button. Click on it.
- After you have done that, you need to select the Microsoft Defender Offline scan. When the scan is selected, click on Scan now.
Note: This scan will take up to 15 minutes depending on your PC, so wait until the process is complete.
- Wait until the procedure is complete and your PC should be rebooted.
- After the computer boots back, go to the Windows Defender to see if the Unknown error still appears.
In case the Unknown error still appears in Windows Defender even after trying all the methods before, go check the last one below.
6. Update your Windows
The last thing you should do is to make sure that you have the latest update for your Windows installed. If the Windows is outdated, this can cause many problems to the Windows, as well as the Unknown error. This can happen because the update is pending, waiting for you to install it.
All you can do is go to the Windows Update to check if there are any updates uninstalled. If there are updates waiting to be installed, make sure to install all of them. The Windows Update can be found inside the Windows Settings of your computer.
In case you don’t know how to check if your Windows is outdated, here are the exact steps you need to follow:
- The first thing you need to do is to press the Windows key + R to open a Run dialog box and type inside the search bar ‘ms-settings:‘, then press Enter. This will open the Windows Settings.
- After the Windows Settings appear on your screen, you need to scroll down through the menu located on the left side of the screen and look for Windows Update. Once you find the section, click on it.
- When the Windows Update section appears on your screen, on the right side of the screen you should be able to see the Check for updates button. Click on it to search for the latest updates. Then click on Install if there are available to install.
- After the updates have been successfully installed, restart your computer to ensure that the updates take effect.
- When the computer is back on, go to the Windows Defender to see if you still encounter the same Unkown error.