Microsoft Defender Antivirus is an integral part of Windows 11, offering robust protection against viruses, malware, and other security threats. While it's designed to keep your system secure, there may be occasions when you need to disable it temporarily or adjust its settings—for instance, when installing software that requires it or if you're using an alternative antivirus solution. This guide will walk you through various methods to enable or disable Microsoft Defender and manage its features in Windows 11.

Enable or Disable Microsoft Defender Temporarily via Settings

If you need to turn off Microsoft Defender Antivirus for a short period, perhaps to install an application that's being blocked, you can disable real-time protection through the Windows Security settings. Here's how:

  1. Press Windows+I to open the Settings app. Alternatively, right-click the Start button and select Settings.
  1. In Settings, select Privacy & security from the left sidebar, then click on Windows Security on the right.
  1. Click on Open Windows Security to launch the Windows Security app.
  1. In Windows Security, select Virus & threat protection from the left panel.
  1. Under the Virus & threat protection settings section, click on Manage settings.
  1. Toggle off the switch under Real-time protection to disable Microsoft Defender temporarily. If prompted by User Account Control (UAC), click Yes.
  1. To re-enable real-time protection, toggle the switch back to On.

Keep in mind that turning off real-time protection is only temporary. Microsoft Defender will automatically turn it back on after a short while or when you restart your computer.

Turn Microsoft Defender Firewall On or Off in Windows 11

Microsoft Defender Firewall helps protect your device by blocking unauthorized network traffic. If you need to disable it temporarily to troubleshoot network issues or allow specific applications, follow these steps:

  1. Open the Windows Security app by clicking the Start button, typing Windows Security, and selecting it from the search results.
  2. In Windows Security, select Firewall & network protection from the left sidebar.
  1. Choose the network profile you want to modify: Domain network, Private network, or Public network. For most home users, select Private network.
  1. Under the Microsoft Defender Firewall section, toggle the switch to Off to disable the firewall. Confirm any prompts that appear.
Warning: Disabling the firewall can expose your device to security risks. Only turn it off when necessary and remember to turn it back on afterward.
  1. To re-enable the firewall, return to the same settings and toggle the switch back to On.

Manage App & Browser Control Settings

The App & Browser Control settings in Windows Security allow you to adjust protection levels for apps, files, and web content. This includes configuring Windows Defender SmartScreen, which helps protect your device from potentially dangerous websites and downloads. To modify these settings:

  1. Open the Windows Security app and select App & browser control from the left sidebar.
  1. Under Reputation-based protection, click on Reputation-based protection settings.
  1. Adjust the settings based on your preferences. You can toggle features like SmartScreen for Microsoft Edge, Potentially unwanted app blocking, and more.

Be cautious when changing these settings, as they provide added security against malicious content. Disabling them might leave your device vulnerable.

Enable or Disable Microsoft Defender Using PowerShell

You can use PowerShell commands to manage Microsoft Defender features. Before proceeding, you need to disable Tamper Protection in Windows Security, which prevents unauthorized changes to security settings.

  1. Open Windows Security and click on Virus & threat protection.
  2. Click on Manage settings under Virus & threat protection settings.
  1. Scroll down to Tamper Protection and toggle it to Off.

After disabling Tamper Protection:

  1. Press the Windows key, type PowerShell, right-click on Windows PowerShell, and select Run as administrator.
  1. In the PowerShell window, enter the following command to disable real-time protection:

Set-MpPreference -DisableRealtimeMonitoring $true

  1. To re-enable real-time protection, run this command:

Set-MpPreference -DisableRealtimeMonitoring $false

Remember to turn Tamper Protection back on after you're done to ensure your security settings remain safe.

Disable Microsoft Defender Using Group Policy Editor

If you're using Windows 11 Pro or a higher edition, you can disable Microsoft Defender permanently using the Group Policy Editor. This method is not available in Windows 11 Home.

Warning: Disabling Microsoft Defender leaves your system unprotected. Proceed only if you have an alternative antivirus installed.

  1. Disable Tamper Protection in Windows Security as described earlier.
  2. Press Windows+R, type gpedit.msc, and press Enter to open the Local Group Policy Editor.
  3. Navigate to: Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus
  1. In the right pane, double-click on Turn off Microsoft Defender Antivirus.
  2. Select Enabled, then click Apply and OK.
  1. Restart your computer for the changes to take effect.

To re-enable Microsoft Defender, change the Turn off Microsoft Defender Antivirus setting to Disabled or Not Configured and restart your PC.

Disable Microsoft Defender Using Registry Editor

Users of Windows 11 Home can disable Microsoft Defender using the Registry Editor. Exercise caution when editing the registry, as incorrect changes can cause system instability.

Warning: Modifying the registry can be risky. It's recommended to back up the registry before proceeding.
  1. Disable Tamper Protection in Windows Security.
  2. Press Windows+R, type regedit, and press Enter to open the Registry Editor.
  3. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender
  1. In the right pane, right-click and select New > DWORD (32-bit) Value. Name it DisableAntiSpyware.
  2. Double-click on DisableAntiSpyware and set the Value data to 1. Click OK.
  1. Restart your computer to apply the changes.

To re-enable Microsoft Defender, delete the DisableAntiSpyware entry or set its value to 0 and restart your PC.


Adjusting Microsoft Defender settings allows you to tailor your security to your needs. Whether you choose to disable it temporarily or modify specific features, always ensure your device remains protected, either by re-enabling Microsoft Defender or installing a trusted third-party antivirus solution.