2

I can't enable/disable real-time monitoring in Windows 10 using PowerShell ISE (as administrator). I have run the command Set-MpPreference -DisableRealtimeMonitoring $false for disabling real-time monitoring (in case it is enabled) and Set-MpPreference -DisableRealtimeMonitoring $true for enabling real-time monitoring (in case it is disabled).

7
  • What errors are you getting? What is the value of Get-MpPreference | Select-Object -Property DisableRealtimeMonitoring after you run each command?
    – Cpt.Whale
    Commented Nov 15, 2021 at 17:14
  • Are there Group Policies set? Commented Nov 15, 2021 at 21:24
  • @Cpt.Whale First I have run the command Get-MpPreference. It shows that the value of DisableRealtimeMonitoring is False. Now I want to make it true. So, I have run the command Set-MpPreference -DisableRealtimeMonitoring $true. Now after running the command, I have again run Get-MpPreference command. But still it shows that the value of DisableRealtimeMonitoring is False.
    – Sann
    Commented Nov 16, 2021 at 5:39
  • 1
    Is "Tamper Protection" enabled? It will prevent you from changing the value: docs.microsoft.com/en-us/answers/questions/28561/…
    – Cpt.Whale
    Commented Nov 16, 2021 at 14:03
  • 1
    @Cpt.Whale after disable Tamper Protection, it works
    – Sann
    Commented Nov 17, 2021 at 10:17

1 Answer 1

0

The only way I have been able to Set-MpPreference -DisableRealtimeMonitoring $true is to disable "Tamper Protection" in the Windows Security App. Then you can run Set-MpPreference -DisableRealtimeMonitoring $true and then Get-MpComputerStatus to see RealTimeProtectionEnabled : False and set fasle to re-enable RealTimeProtection

A resource that might help: https://www.windowscentral.com/how-manage-microsoft-defender-antivirus-powershell-windows-10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .