Quickly disable Windows Defender on Windows 10 using PowerShell

Here's a couple of commands that come in handy if you need to temporarily disable real time monitoring of Windows Defender on the Windows 10 Technical Preview release.

At present my Defender is happily monitoring with real-time protection switched on.

Fire up a PowerShell window as administrator and run the following command:

Set-MpPreference -DisableRealtimeMonitoring $true

You'll soon get a Windows notification warning you that the monitoring is disabled.

and you will notice that your Defender is now no longer monitoring in real-time.

Just set the DisableRealTimeMonitoring back to false to re-enable the real-time monitoring within Defender.

Set-MpPreference -DisableRealtimeMonitoring $false

Everything will be green again.