How to Reinstall Windows Security on Windows 11
In this article
Reinstalling Microsoft Defender Antivirus (commonly called Windows Security) is a targeted fix for issues like the app failing to open, showing errors, or being stuck in a disabled state. This process restores the core security components of Windows without wiping your personal files, apps, or settings. It is distinct from a full factory reset and is generally safer than reinstalling the entire operating system. Before starting, ensure you have an active internet connection and administrator privileges on your PC.
What You'll Need
- A Windows 11 PC with administrator access
- An active internet connection to download fresh system files
- Windows PowerShell (built-in tool)
- Patience: The process may take several minutes depending on your hardware speed
Step-by-Step
- Open PowerShell as Administrator: Right-click the Start button or press the Windows key + X on your keyboard. From the menu that appears, select "Terminal (Admin)" or "Windows PowerShell (Admin)." If prompted by User Account Control, click Yes to allow administrative changes.
- Verify Current Status: In the PowerShell window, type the following command and press Enter:
Get-WindowsOptionalFeature -Online -FeatureName AntiMalware. This checks if the feature is enabled. If it shows "Enabled," you can skip to step 4. If it shows "Disabled" or returns an error, proceed to the next step. - Enable the Feature via Command: If the feature is disabled, run this command to enable it immediately:
Enable-WindowsOptionalFeature -Online -FeatureName AntiMalware -NoRestart. Wait for the progress bar to complete. This command forces Windows to re-enable the core antivirus component. - Reset Windows Security App Data: Often, the app itself is corrupted rather than the underlying service. Close any open instances of Windows Security. Press Windows Key + R, type
%localappdata%\Packages\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy, and press Enter. Delete all folders inside this directory. This clears the cached data for the security app, forcing it to rebuild its configuration upon restart. - Repair System Files: Corrupted system files can prevent Windows Security from loading correctly. In the same PowerShell window, type
sfc /scannowand press Enter. Let the scan complete. If it finds and repairs files, restart your computer. If it finds no integrity violations, proceed to the next step. - Run DISM Repair: If SFC did not fix the issue, use the Deployment Image Servicing and Management tool. Type
DISM /Online /Cleanup-Image /RestoreHealthin PowerShell and press Enter. This downloads fresh system files from Windows Update to replace damaged ones. This process may take 10–20 minutes. Do not close the window until it finishes. - Restart Your Computer: After completing the above steps, restart your PC. Upon reboot, Windows will automatically check for missing security components and reinstall them if necessary. Open the Start menu, type "Windows Security," and verify that the app launches without errors.
Common Mistakes
One frequent error is attempting to delete the Windows Security app entirely through Settings > Apps. You cannot uninstall Microsoft Defender Antivirus from Windows 11; it is a core OS component. Trying to force-remove it via third-party tools often breaks system stability. Another mistake is skipping the sfc /scannow step. If system files are corrupt, simply resetting the app cache will not resolve the issue because the underlying framework is damaged. Always run system file repair before assuming the app needs a full reinstall.
Tips
If you have recently installed third-party antivirus software, Windows Security may be automatically disabled. Reinstalling or enabling it while another antivirus is active can cause conflicts. Ensure your third-party antivirus is fully uninstalled before attempting to restore Windows Security. Additionally, keep your Windows 11 installation updated. Go to Settings > Windows Update and install any pending updates, as Microsoft frequently patches bugs related to the security app in cumulative updates.
Troubleshooting
If Windows Security still fails to open after these steps, try resetting the app through Settings. Navigate to Settings > Apps > Installed Apps, find "Windows Security," click the three dots, select Advanced Options, and click "Repair." If "Repair" does not work, click "Reset." Note that Resetting will clear the app's local data but will not affect your personal files or other apps. If the app remains broken, perform a Windows 11 In-Place Upgrade using the Media Creation Tool. This reinstalls Windows while keeping your files and apps intact, effectively replacing all corrupted system components including Defender.
Frequently Asked Questions
Will reinstalling Windows Security delete my files?
No. Reinstalling or repairing Windows Security only affects the security application and its associated system files. Your documents, photos, installed programs, and user accounts remain untouched.
Can I uninstall Windows Security completely?
No. Microsoft Defender is integrated into the Windows 11 operating system and cannot be permanently removed. You can disable it temporarily or switch to a third-party antivirus, but it will always remain part of the OS architecture.
Why is Windows Security grayed out or disabled?
This usually indicates that another antivirus program is currently running, or that malware has tampered with system settings. Removing the conflicting software or running a full system scan typically resolves this.
Does the sfc /scannow command take long?
The command typically takes between 10 to 30 minutes to complete, depending on the speed of your hard drive or SSD and the extent of file corruption. Do not interrupt the process.
What if DISM fails to restore health?
If DISM reports that it cannot fix the image, your Windows Update service might be blocked or corrupted. Try clearing the Windows Update cache by stopping the wuauserv service, deleting files in C:\Windows\SoftwareDistribution\Download, and restarting the service. Then retry DISM.
Is it safe to delete the SecHealthUI folder manually?
Yes, it is safe. This folder stores temporary data and preferences for the Windows Security app. Deleting its contents forces the app to recreate fresh configuration files upon the next launch, which often fixes display or loading errors.