Prevent indexing certain paths: registry value PreventIndexingCertainPaths_1 (HKLM Windows Search)ComputerHKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search

Policy ID
PreventIndexingCertainPaths_1
Scope
Computer Configuration
Supported on
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
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Windows Components › Search

Registry

(list values)

REG_SZComputer
Enabled value
Depends on the option value
Element
Prevent Indexing Certain Paths
Value type
REG_SZ
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search\PreventIndexingCertainPaths]
"<enter value>"="<enter value>"
CMD
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search\PreventIndexingCertainPaths" /v "<enter value>" /t REG_SZ /d "<enter value>" /f
PowerShell
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\PreventIndexingCertainPaths' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search\PreventIndexingCertainPaths' -Name '<enter value>' -PropertyType String -Value '<enter value>' -Force | Out-Null