Skip to content

Disable Microsoft Defender Antivirus

Purpose

When running the Windows IS in a VM it consumes a lot of CPU resource because of Microsoft's Defender Antivirus. Especially when updating applications or using external disk resources through Samba.

Using Powershell

Run a elevated powershell and run the command:

Set-MpPreference -DisableRealtimeMonitoring $true

Permanently Disable via Group Policy Editor

This method is only available for Windows 10/11 Pro, Enterprise, and Education editions.

Open Group Policy Editor:

gpedit.msc

Navigate to Windows Defender Settings:

Go to Computer Configuration > Administrative Templates > Windows Components > Microsoft Defender Antivirus an disable Microsoft Defender Antivirus.

Double-click on Turn off Microsoft Defender Antivirus. Select Enabled and click Apply, then OK.

Reboot the system.