Open in the explorer

Allow antimalware service to remain running always

Autoriser le service anti-programme malveillant à rester constamment actif

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Microsoft Defender Antivirus FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Antivirus Microsoft Defender
Supported on
At least Windows Server 2012, Windows 8 or Windows RT FR: Au minimum Windows Server 2012, Windows 8 ou Windows RT
ADMX file
WindowsDefender.admx
Internal name
WindowsDefender/ServiceKeepAlive

Explanation

This policy setting allows you to configure whether or not the antimalware service remains running when antivirus and antispyware security intelligence is disabled. It is recommended that this setting remain disabled.

If you enable this setting, the antimalware service will always remain running even if both antivirus and antispyware security intelligence is disabled.

If you disable or do not configure this setting, the antimalware service will be stopped when both antivirus and antispyware security intelligence is disabled. If the computer is restarted, the service will be started if it is set to Automatic startup. After the service has started, there will be a check to see if antivirus and antispyware security intelligence is enabled. If at least one is enabled, the service will remain running. If both are disabled, the service will be stopped.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de configurer si le service anti-programme malveillant reste ou non actif lorsque la veille de sécurité anti-espions et la veille de sécurité antivirus sont désactivées. Il est recommandé que ce paramètre reste désactivé.

Si vous activez ce paramètre, le service anti-programme malveillant reste constamment actif même si la veille de sécurité anti-espions et la veille de sécurité antivirus sont toutes deux désactivées.

Si vous désactivez ce paramètre ou que vous ne le configurez pas, le service anti-programme malveillant est arrêté lorsque la veille de sécurité anti-espions et antivirus est désactivée. Si l’ordinateur est redémarré, le service est démarré si son démarrage automatique est défini. Une fois le service démarré, une vérification est effectuée pour déterminer si la veille de sécurité anti-espions et la veille de sécurité antivirus sont activées. Si au moins l’une d’elles est activée, le service reste actif. Si les deux sont désactivées, le service est arrêté.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows Defender
Value name
ServiceKeepAlive
StateValue written
EnabledREG_DWORD = 1
DisabledREG_DWORD = 0

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: WindowsDefender/ServiceKeepAlive
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ServiceKeepAlive' -Value 1 -Type DWord

Disable

# Disable: WindowsDefender/ServiceKeepAlive
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'ServiceKeepAlive' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WindowsDefender/ServiceKeepAlive
$k = 'HKLM:\Software\Policies\Microsoft\Windows Defender'
Remove-ItemProperty -Path $k -Name 'ServiceKeepAlive' -ErrorAction SilentlyContinue

Availability