I am trying to configure windows defender preferences through PowerShell as administrator. I am using the following commands:
Set-MpPreference -ScanScheduleDay 5
Set-MpPreference -ScanScheduleTime 03:57
However when checking the results with
Get-MpPreference
The settings have not changed even after restarting the pc. However checking the corresponding registry keys (regedit.exe) I find that the keys do change to the new values straight away:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Scan
Are my commands actually changing the settings? Other setting that I can check in the “windows security” app, do work fine such as:
Set-MpPreference -DisableRealtimeMonitoring 1