Disable windows defender, command line

This is tested and works on Windows 10.

Open Windows PowerShell in "Run As Administrator" mode.

Check real-time protection status of Windows Defender:
Get-MpPreference | FL *RealtimeMonitoring
Turn-off Windows Defender real-time protection with PowerShell:
Set-MpPreference -DisableRealtimeMonitoring $true
Check real-time protection status of Windows Defender:
Get-MpPreference | FL *RealtimeMonitoring
Turn-on Windows Defender real-time protection with PowerShell:
Set-MpPreference -DisableRealtimeMonitoring $false
Check real-time protection status of Windows Defender:
Get-MpPreference | FL *RealtimeMonitoring

No comments: