Ouvrir dans l'explorateur

Empêcher l’indexation lors de l’utilisation de la charge de la batterie pour conserver l’énergie

Prevent indexing when running on battery power to conserve energy

Type
Ordinateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Rechercher EN : Computer Configuration › Policies › Administrative Templates › Windows Components › Search
Pris en charge sur
Microsoft Windows XP, Windows Server 2003 avec Windows Search version 3.01 ou toute version de Microsoft Windows avec Windows Search 4.0 ou ultérieure EN : Microsoft Windows XP, Windows Server 2003 with Windows Search version 3.01, or any version of Microsoft Windows with Windows Search 4.0 or later
Fichier ADMX
Search.admx
Nom interne
Search/PreventIndexOnBattery

Explication

Texte français issu de Windows 11 26H2

S’il est activé, l’indexeur est suspendu chaque fois que l’ordinateur fonctionne avec la charge de la batterie. S’il est désactivé, l’indexation suit le comportement par défaut. Ce paramètre est désactivé par défaut.

If enabled, the indexer pauses whenever the computer is running on battery. If disabled, the indexing follows the default behavior. Default is disabled.

Registre

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search
Nom de la valeur
PreventIndexOnBattery
ÉtatValeur écrite
ActivéREG_DWORD = 1
DésactivéREG_DWORD = 0

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Activer

# Activer : Search/PreventIndexOnBattery
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventIndexOnBattery' -Value 1 -Type DWord

Désactiver

# Désactiver : Search/PreventIndexOnBattery
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'PreventIndexOnBattery' -Value 0 -Type DWord

Revenir à « Non configuré »

# Revenir à « Non configuré » : Search/PreventIndexOnBattery
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
Remove-ItemProperty -Path $k -Name 'PreventIndexOnBattery' -ErrorAction SilentlyContinue

Disponibilité