Windows 10: Turn On or Off Windows Defender Real-time Protection in Windows 10  

Page 7 of 7 FirstFirst ... 567
  1.    3 Weeks Ago #60

    cb360t said: View Post
    Hi Brink,

    I found a toggle solution at this site:

    Thanks for pointing me in the right direction.
    Update on the Powershell script to display the status of Real-time Protection when you toggle it.

    Open Notepad and paste the following in it. Save it as tog.ps1.

    $preferences = Get-MpPreference #gets preferences for the Windows Defender scans and updates
    Set-MpPreference -DisableRealtimeMonitoring (!$preferences.DisableRealtimeMonitoring) #toggle Real-time Protection ON/OFF
    $status = $preferences.DisableRealtimeMonitoring #store current status of Real-time Protection in $status
    Write-host " "
    if ($status) {
       Write-host "Real-time Protection is  ON"
    } Else {
       Write-host "Real-time Protection is  OFF"
    Write-host " "
    Write-host "Press any key to exit"
    $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")|out-null #pause and wait for key press

    Right-click on an empty area on your desktop and select Shortcut.
    Paste the following in the ‘Browse’ box but replace the ‘Path to script’ with the actual path to the script you created.

    %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Utilities\+Misc\tog.ps1"

    Once you’ve created the shortcut, right-click it and select the ‘Run as administrator’ option.
    When you run the script, the current status of Real-time Protection will be displayed as ON or OFF.
    Of course, you can also pin the shortcut to the start menu and/or the taskbar.
    Last edited by Brink; 3 Weeks Ago at 10:47. Reason: code box
      My ComputerSystem Spec

  2.    3 Weeks Ago #61

    small typo in section 4.2
    2. Enter the command below you want to use into PowerShell, and press Enter. (see screenshots below)

    (Turn on)
    Set-MpPreference -DisableRealtimeMonitoring 0
    Set-MpPreference -DisableRealtimeMonitoring $true


    (Turn off)
    Set-MpPreference -DisableRealtimeMonitoring 1
    Set-MpPreference -DisableRealtimeMonitoring $false
    the $true and $false are backwards - in powershell $false is 0 and $true is 1 (or any other number).

    Name:  Capture.PNG
Views: 71
Size:  11.7 KB
    Last edited by lx07; 3 Weeks Ago at 09:40. Reason: Picture
      My ComputerSystem Spec

  3. Posts : 27,875
    64-bit Windows 10 Pro build 17627
    Thread Starter
       3 Weeks Ago #62

    Thank you lx07. Now corrected.
      My ComputersSystem Spec

Page 7 of 7 FirstFirst ... 567

Tutorial Categories

Turn On or Off Windows Defender Real-time Protection in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Xbox Windows Phone

Related Threads
Windows Defender Antivirus helps protect your PC against malware (malicious software) like viruses, spyware, and other potentially unwanted software. Malware can infect your PC without your knowledge: it might install itself from an email message,...
Performance & Maintenance Turn On or Off System Protection for Drives in Windows 10 in Tutorials
System protection is a feature that allows you to undo unwanted system changes by being able to do a System Restore. System Restore enables users, in the event of a problem, to restore their computers to a previous state (restore point) without...
Hi, how can I disable Windows Defender Real-time protection but keep the Windows Defender app available and working? I've seen ways to disable Windows Defender Real-time protection in W10, however this involved disabling Windows Defender as a...
Defender: Disabled Real time; keep scheduled and on demand in AntiVirus, Firewalls and System Security
I just upgraded to Win 10 (RTM build). I have disabled the AV (Defender, why did they go back to the old name?) real time protection because I do not run it, never did and have never gotten a virus (and I've had a computer for 30 years). I was...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:33.
Find Us