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).
1 Answer
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
Get-MpPreference | Select-Object -Property DisableRealtimeMonitoring
after you run each command?Get-MpPreference
. It shows that the value ofDisableRealtimeMonitoring
is False. Now I want to make it true. So, I have run the commandSet-MpPreference -DisableRealtimeMonitoring $true
. Now after running the command, I have again runGet-MpPreference
command. But still it shows that the value ofDisableRealtimeMonitoring
is False.