Wednesday, September 16, 2020

Disable Windows Defender Real-time protection from the command line

Why? Because it significantly slows down Visual Studio build process.

PowerShell

Get the current status:

(Get-MpPreference).DisableRealtimeMonitoring

Disable Real-time protection (requires admin rights):

Set-MpPreference -DisableRealtimeMonitoring $true

Command line

Get the current status:

powershell (Get-MpPreference).DisableRealtimeMonitoring

Disable Real-time protection (requires admin rights):

powershell Set-MpPreference -DisableRealtimeMonitoring $true

No comments:

Post a Comment