Windows Defender (Microsoft Defender) is an anti-malware protection software that keeps Windows protected from malicious threats. It is Microsoft’s official built-in antivirus protection application that comes pre-installed on every Windows edition. Windows Defender was first officially released in 2006. After its release, it became an integral part of every Windows edition, including XP 2006, XP 2007, Vista, 7, 8, 8.1, 10, and now 11.

Although, it is not recommended to disable Windows Defender, as doing so will expose the computer to malicious threats. However, there comes a need when users are required to disable Windows Defender temporarily to perform a specific task. Windows Defender can be disabled using a number of Windows tools including PowerShell, Command Prompt, Registry Editor, Group Policy Editor, Settings, and Control Panel.

Why You Should not Disable Windows Defender?

It is never a good idea to disable the Windows Defender potentially, as it will expose your computer to malicious threats. Which will help hackers to exploit your system and steal your information. However, if you have already downloaded and installed third-party antivirus programs such as McAfee, Avast, Avira, Bitdefender, AVG, or Malwarebytes then it is ok to disable Windows Defender.

In this article, the method to disable the Windows Defender using PowerShell will be elaborated.

How to Disable Windows Defender Using PowerShell?

PowerShell is Windows most powerful and advanced tool. It is generally used for administrator-level tasks. PowerShell can be utilized to disable the Windows Defender in Windows. However, one of the prerequisites to disable the Windows Defender is to turn off the Tamper Protection.

How to Disable the Tamper Protection?

The Tamper Protection is a security filter that is used to prevent the users from making any changes to the Windows Security settings. Turning off the Tamper Protection will allow the users to turn off the Windows Defender.

Step 1: Launch the Windows Security app via the Start menu:

Step 2: Move to the Virus & Threat Protection section.

Step 3: Select the Manage settings option:

Step 4: Find the Tamper Protection settings and disable them:

Note: Before disabling Windows Defender, make sure that you have other third-party antivirus programs installed.

Bonus Tip: How to Enable the Windows Defender Using PowerShell

After disabling Tamper Protection in the Windows Security application, you can now disable the Windows Defender using PowerShell, by checking the below-mentioned steps.

Step 1: Press the Windows key + X to open the Quick Access Menu and select Windows PowerShell(Admin):

Step 2: Type the mentioned command and press the Enter key: 

Set-MpPreference -DisableRealtimeMonitoring $true

Bonus Tip: How to Completely Disable the Windows Defender?

In the early edition of Windows, disabling real-time protection was all needed to disable Windows Defender. However, now, Windows Defender has the fail-safe mode on, meaning that whenever the user disables it, it gets turned back on. Instead of disabling it, users can uninstall it from Windows. Another way to disable it is to install any other third-party antivirus program on Windows.

To disable the Windows Defender permanently, read this article.

Note: The mentioned commands can also be executed in the Command Prompt (CMD) console to disable/enable Windows Defender.


Before disabling Windows Defender, it is required to turn off the Tamper Protection. Then, open PowerShell as an administrator and type Set-MpPreference -DisableRealtimeMonitoring $true code to disable Windows Defender. Potentially it is not recommended to disable Windows Defender, as it can expose your system to malware threats. Read the above article to learn the practical way of disabling the Windows Defender using PowerShell.