I was trying to disable the Windows Defender like this:
commands:
disable-windows-defender:
steps:
- run:
name: Disable Windows Defender
shell: powershell.exe
command: Set-MpPreference -DisableRealtimeMonitoring $true
and it results in this error:
#!powershell.exe
Set-MpPreference -DisableRealtimeMonitoring $true
Set-MpPreference : A general error occurred that is not covered by a more specific error code.
At line:1 char:1
+ Set-MpPreference -DisableRealtimeMonitoring $true
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_MpPreference:root\Microsoft\...FT_MpPreference) [Set-MpPreference],
CimException
+ FullyQualifiedErrorId : HRESULT 0x800106ba,Set-MpPreference
Exited with code exit status 1
CircleCI received exit code 1
How may I disable the Windows Defender correctly?