If you, like me, do not want your Windows 11 computer’s CPU resources spent on antivirus processes and wish to disable Windows Defender completely, you may have found various methods to disable its components via Group Policy (gpedit.msc
) and the Windows Registry (regedit.exe
). However, starting from version 23H2, Windows will “self-heal” and restore any such settings upon restart. This can be frustrating, and I disagree with Microsoft deciding what my computer does on my behalf.
Here is how to permanently disable the real-time antivirus protection in Windows 11:
Create a folder on your disk:
For example, C:\Scripts
.
Create a new PowerShell script file:
Open Notepad or any text editor.
Save the file as turn-off-rt-protection.ps1
in the C:\Scripts
folder.
Add the following line to the script:Set-MpPreference -DisableRealtimeMonitoring $true
Configure the script to run at startup using Task Scheduler:
Open Task Scheduler (you can search for it in the Start menu).
Click on “Create Task” in the right-hand Actions pane.
General Tab:
Name: Enter a name for the task (e.g., “Disable Real-Time Protection”).
Security options: Check “Run with highest privileges”.
Triggers Tab:
Click “New…” to create a new trigger.
Begin the task: Select “At log on”.
Settings: Choose “Any user” or specify a user.
Check “Delay task for:” and set it to 1 minute.
Click “OK”.
Actions Tab:
Click “New…” to create a new action.
Action: Select “Start a program”.
Program/script: Enter powershell.exe
.
Add arguments: Enter -ExecutionPolicy Bypass -File "C:\Scripts\turn-off-rt-protection.ps1"
… >>> Click to read the full post...