Turn off storage and display of search history
Désactiver le stockage et l’affichage de l’historique de recherche
Explanation
This policy setting prevents search queries from being stored in the registry. If you enable this policy setting, search suggestions based on previous searches won't appear in the search pane. Search suggestions provided by apps or by Windows based on local content will still appear.
If you disable or do not configure this policy setting, users will get search suggestions based on previous searches in the search pane.
Ce paramètre de stratégie empêche le stockage des requêtes de recherche dans le Registre. Si vous activez ce paramètre de stratégie, les suggestions de recherche basées sur des recherches précédentes n’apparaissent pas dans le volet de recherche. Les suggestions de recherche fournies par des applications ou par Windows en fonction du contenu local apparaissent toutefois.
Si vous désactivez ou ne configurez pas ce paramètre de stratégie, les suggestions de recherche proposées aux utilisateurs sont basées sur les recherches précédentes effectuées dans le volet de recherche.
Registry
HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer- Value name
DisableSearchHistory
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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: Search/DisableSearchHistory
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableSearchHistory' -Value 1 -Type DWordDisable
# Disable: Search/DisableSearchHistory
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisableSearchHistory' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": Search/DisableSearchHistory
$k = 'HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer'
Remove-ItemProperty -Path $k -Name 'DisableSearchHistory' -ErrorAction SilentlyContinue