How to Reinstall Windows Defender in Windows 11

This PowerShell command reinstalls Windows Defender in seconds

What to Know

  • You don't need to download Windows Defender, because it's integrated into Windows 11.
  • Enter this in a PowerShell window: Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage.
  • Or, go to Settings > Apps > Apps & features > Windows Security > three dots > Advanced options > Reset.

This article explains when and how to reinstall Windows Defender through the command line or Settings app in Windows 11.

How to Reinstall Windows Defender in Windows 11

Windows Defender (aka, Microsoft Defender) isn't installed on your computer like a typical program, so you can't reinstall it like you can regular software. Instead, follow these directions to use a PowerShell command to get the job done. It might take anywhere from 5 seconds to a few minutes to complete. If you can open Settings normally, there's an easier method after these steps.

  1. Right-click the Start button and select Windows Terminal (Admin).

    If that doesn't work for whatever reason, use the search bar on the taskbar to search for PowerShell, and then right-click it to find the Run as administrator option.

  2. Copy the command exactly as it's shown here, and then right-click in the PowerShell window to paste it (Ctrl+V works, too):

    Get-AppxPackage Microsoft.SecHealthUI -AllUsers | Reset-AppxPackage
    
  3. Press Enter to immediately start the process to reset Windows Defender to its original settings so that it performs as a freshly installed app.

    get appxpackage microsoft sechealthui powershell command in Windows 11
  4. You'll know when it's finished because you'll see the blinking cursor again on a new line below the command you entered. In the meantime, you might briefly see a Deployment operation progress message.

    If you see lots of red text, and an "Access is denied" message, return to step 1 and make sure you're opening PowerShell as an administrator.

Another way to reset Windows Defender is through Settings. If Settings opens fine for you, you don't need to bother with a PowerShell command. Instead, go to Settings > Apps > Apps & features > Windows Security > three dots > Advanced options > Reset.

Reset in Windows Security options

When to Reinstall Windows Defender

Technically, you're not really reinstalling the program because Windows doesn't actually let you uninstall it. That said, you might run the above command to reset Windows Defender if it's just not working correctly.

The most obvious sign you need to do this is if you see an error when you try to open it. If it's not opening as it should, and you see this message, the above command should fix it right away:

You'll need a new app to open this windowsdefender link
Look for an app in the Microsoft Store

Or, maybe it does open, but some of its toggles won't turn on or off, or you can't even find a link to it on your computer. In these cases, the PowerShell command should refresh the tool back to working order.

Windows Defender Might Just Be Off

It's possible that you've considered reinstalling Windows Defender because it isn't catching malware, when in reality, it's just not turned on. You might think it's been uninstalled or is broken, but really it's just disabled.

On toggle under Real time protection in Windows Security virus and threat protection settings

This is completely possible since Windows 11 lets you turn off its built-in antivirus program if you'd rather not use it.

Learn how to turn Windows Defender on and off for specific directions.

FAQ
  • Is Windows Defender a good antivirus?

    Not really. While Windows Defender provides basic protection from threats, it's no substitute for third-party antivirus software.

  • How do I add exceptions to Windows Defender?

    Go to Start > Settings > Privacy & Security > Windows Security > Virus & threat protection. Under Virus & Threat Protection Settings, select Manage settings, then under Exclusions, select Add or remove exclusions.

Was this page helpful?